查看: 1904|回复: 0

[教程] 【一网打尽】Raspberry Pi Course Week 3 – Day 4.0 (IP Address)

[复制链接]
  • TA的每日心情
    开心
    2016-8-4 10:56
  • 签到天数: 242 天

    连续签到: 1 天

    [LV.8]以坛为家I

    发表于 2015-3-27 17:34:47 | 显示全部楼层 |阅读模式
    分享到:

    We have talked about IP address and how to configure them and we have briefly explained why you need one for the Raspberry Pi.   A more in depth explanation of IP addresses are needed so you can really understand the network around you and the type of devices that require an IP address.

    Every device from a computer to a phone requires a unique identifier to communicate with other devices on a network or the internet.  If you are to address a letter in the mail, then you need to address with an exact address so that the post office know where house address this id destined for.  Most networks on the internet use something called TCP/IP protocol to communicate.  This is a common standard which allows all devices to abide by these rules so that each device can communicate with each other.  This is no different from learning the French language so that you are able to communicate with a French speaking person.

    Currently two standards for IP addresses exist and they are IPv4 and IPv6.  The main different between the two is that IPv6 is a new addition which allows more devices to be connected to the internet and at the same time be unique.  With IPv4 this would not be possible because there isn’t enough IP address available with IPv4.  Another difference is the way in which the IP addresses are represented.

    IPv4 looks like this 192.168.100.100.

    IPv6 is expressed like this 201c:cab7:0000:9832:0000:0000:ad01:fffa

    This early part of course will only look at IPv4.

    How can you get an IP address?
    An IP address can either be dynamic of static.  Dynamic means that the Raspberry Pi will automatically get an IP address from a server of router.  Static means that the IP address has to be allocated to the Raspberry Pi manually.

    Open a terminal window and type the following.

    # ifconfig

    The following information will be returned although your IP address and device may be different.

    eth0      Link encap:Ethernet  HWaddr 08:10:27:ff:65:cc

    inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0

    inet6 addr: fe80::a00:27ff:feef:65bc/64 Scopeink

    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

    RX packets:19 errors:0 dropped:0 overruns:0 frame:0

    TX packets:52 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:1000

    RX bytes:2372 (2.3 KiB)  TX bytes:7776 (7.5 KiB)


    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /4 下一条



    手机版|小黑屋|与非网

    GMT+8, 2024-11-19 13:36 , Processed in 0.106101 second(s), 15 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.