2 PC [1], [2], [3] 2.1 OS 2.1 ifconfig 2.1 lo ifconfig -a 2.1 enp1s0, enx0090cce7c734, lo 3 enp1s0 enx0090cce7c734 PC 2.1 (eth0, eth1) PC 14
$ ifconfig lo Link encap: inet :127.0.0.1 :255.0.0.0 inet6 : ::1/128 : UP LOOPBACK RUNNING MTU:65536 :1 RX :8 :0 :0 :0 :0 TX :8 :0 :0 :0 :0 (Collisions):0 TX :0 RX :696 (696.0 B) TX :696 (696.0 B) $ ifconfig -a enp1s0 Link encap: 00:0c:29:4a:9c:a7 BROADCAST MULTICAST MTU:1500 :1 RX :0 :0 :0 :0 :0 TX :0 :0 :0 :0 :0 (Collisions):0 TX :1000 RX :0 (0.0 B) TX :0 (0.0 B) enx0090cce7c734 Link encap: 00:90:cc:e7:c7:34 BROADCAST MULTICAST MTU:1500 :1 RX :0 :0 :0 :0 :0 TX :0 :0 :0 :0 :0 (Collisions):0 TX :1000 RX :0 (0.0 B) TX :0 (0.0 B) lo Link encap: inet :127.0.0.1 :255.0.0.0 inet6 : ::1/128 : UP LOOPBACK RUNNING MTU:65536 :1 RX :1296 :0 :0 :0 :0 TX :1296 :0 :0 :0 :0 (Collisions):0 TX :1 RX :97664 (97.6 KB) TX :97664 (97.6 KB) 2.1: ifconfig 15
2.1 PC USB LAN 1 ( LAN ) 2.1 enp eth0 enx eth1 1 2 eth0 = (enp ) eth1 = (enx ) eth0 = (enp ) eth1 = (enx ) 2.2 IP 2.1 eth0 eth1 (Ethernet) (lo ) 2.1 2.1 enp1s0 eth0 00:0c:29:4a:9c:a7 ( ) 48 48 8 16 (:) 1 2 2 2.1 3 24 (22 ) 2 00 22 IEEE (Institute of Electrical and Electronics Engineers) 16
OUI (Organizationally Unique Identifier) MA-L (MAC Address Block Large) 26 MA-M 34 MA-S 25 48 (24 ) 2 00 24 MAC (Media Access Control) Ethernet 2.1 (*) 2 2.2 (*) PC ( 1 ) eth0 eth1 : https://regauth.standards.ieee.org/standards-ra-web/pub/view.html Please select a Product All MAC (MA-L, MA-M, MA-S) SEARCH RESULTS Filter results by search text MAC Filter (PC ) 2.2 1.1 (p.7) 2 PC 1 5 pc1 5 4 3 2 1 1 Hub pc2 1 pc2 1 2 5 pc2 ( 1 ) ( ) (protocol) 2 ( ) ( Hub ) 17
pc1 5 4 3 2 1 pc2 5 4 3 2 1 switching Hub 2.2: ( ) pc1 router pc2 5 4 3 2 1 3 2 1 5 4 3 2 1 2.3: ( ) 2.3 ( : router) 1 3 ( ) IP (Internet Protocol) IP 4 (IPv4) 32 8 10 (.) IP 130.158.69.233 IP IP PC (endeavor01 16) IP 2.1 {x,y} x y n = 1 254 endeavor01 endeavor02 IP 192.168.1.1 18
254 192.168.2.1 254 PC endeavor01,02 endeavor03,04 endeavor05,06 endeavor07,08 endeavor09,10 endeavor11,12 endeavor13,14 endeavor15,16 IP 192.168.{1,2}.n 192.168.{3,4}.n 192.168.{5,6}.n 192.168.{7,8}.n 192.168.{9,10}.n 192.168.{11,12}.n 192.168.{13,14}.n 192.168.{15,16}.n 2.1: IP 2.3 (*) IPv4 A C D A C 2.1 IP? 2.4 (*) 2.1 n 1 254 n 8 0 255 0 255 IP IP 0 255 lo 127.x.y.z (x,y,z = 0 255) 127.0.0.1 2.3 IP IP ifconfig 2.4 ifconfig eth0 IP 192.168.100.1 su ifconfig eth0 IP (inet ) 192.168.100.1 19
$ sudo ifconfig eth0 inet 192.168.100.1 $ ifconfig eth0 eth0 Link encap: 00:0c:29:4a:9c:a7 inet :192.168.100.1 :192.168.100.255 :255.255.255.0 inet6 : fe80::20c:29ff:fe4a:9ca7/64 : UP BROADCAST RUNNING MULTICAST MTU:1500 :1 RX :0 :0 :0 :0 :0 TX :3 :0 :0 :0 :0 (Collisions):0 TX :1000 RX :0 (0.0 B) TX :238 (238.0 B) 2.4: IP 2.2 2.1 PC IP 2 IP 3 4 PC endeavor01 endeavor02 3 1 4 1 2 2 IP 192.168.1.1 192.168.1.2 IP PC eth0 (eth1 ) eth0 2.1 PC IP ifconfig 2.4 2.2 PC ping 2.5 192.168.100.1 PC 192.168.100.2 ping $ ping -c 4 192.168.100.2 PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. 64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=3.28 ms 64 bytes from 192.168.100.2: icmp_seq=2 ttl=64 time=1.61 ms 64 bytes from 192.168.100.2: icmp_seq=3 ttl=64 time=1.61 ms 64 bytes from 192.168.100.2: icmp_seq=4 ttl=64 time=1.62 ms --- 192.168.100.2 ping statistics --- 4 packets transmitted, 4 received, 0% loss, time 3028ms rtt min/avg/max/mdev = 1.615/2.033/3.280/0.720 ms 2.5: ping ( ) 20
$ ping -c 4 192.168.100.2 PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. From 192.168.100.1 icmp_seq=1 Destination Host Unreachable From 192.168.100.1 icmp_seq=2 Destination Host Unreachable From 192.168.100.1 icmp_seq=3 Destination Host Unreachable From 192.168.100.1 icmp_seq=4 Destination Host Unreachable --- 192.168.100.2 ping statistics --- 4 packets transmitted, 0 received, +4 errors, 100% loss, time 3021ms pipe 3 2.6: ping ( ) ping IP ( (RTT: Round Trip Time) ) ping -c 4 192.168.100.2 ( icmp seq 1 4 ) 4 RTT 3.28ms, 1.61ms, 1.61ms, 1.62ms (statistics) (loss) 0% RTT (avg) 2.033ms 2.6 100% ping 2.3 2.2 PC ping Hub ( Hub) Hub ( Hub) 2.1 IP $ sudo ifconfig eth1 inet 0.0.0.0 21
2.5 ping 3 RTT Hub ( Hub) 2.3 RTT 1. 127.0.0.1 2. eth0 IP ( eth0 192.168.1.1 192.168.1.1 ping ) 2.6 PC $ sudo sh -c "echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts" ping ( -b ) 3 2.5 (DUP!) 2.4 1. eth0 IP 4 255 ( eth0 192.168.1.1 192.168.1.255 ping ) 2. eth0 IP 4 0 OS 2.4 PC $ sudo sh -c "echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts" 22
2.5 2.3 ifconfig IP IP Ubuntu 16.04 LTS OS ifup 2.7 /etc/network/interfaces.d/eth0 eth0 IP (4.3.1 (p.60) ) ifup eth0 ( ) $ sudo ln -s /etc/resolv.conf /etc/resolv.conf $ sudo emacs /etc/network/interfaces.d/eth0 $ cat /etc/network/interfaces.d/eth0 auto eth0 iface eth0 inet static address 192.168.100.1 netmask 255.255.255.0 iface eth0 inet6 auto $ sudo ifup eth0 eth0 $ ifconfig eth0 ( ) eth0 Link encap: 00:0c:29:4a:9c:a7 inet :192.168.100.1 :192.168.100.255 :255.255.255.0 ( ) $ ping -c 4 192.168.100.2 PING 192.168.100.2 (192.168.100.2) 56(84) bytes of data. 64 bytes from 192.168.100.2: icmp_seq=1 ttl=64 time=3.28 ms 64 bytes from 192.168.100.2: icmp_seq=2 ttl=64 time=1.61 ms 64 bytes from 192.168.100.2: icmp_seq=3 ttl=64 time=1.61 ms 64 bytes from 192.168.100.2: icmp_seq=4 ttl=64 time=1.62 ms --- 192.168.100.2 ping statistics --- 4 packets transmitted, 4 received, 0% loss, time 3028ms rtt min/avg/max/mdev = 1.615/2.033/3.280/0.720 ms 2.7: ifup 23
$ sudo ifdown eth0 eth0 $ ifconfig eth0 ( ) lo Link encap: inet :127.0.0.1 :255.0.0.0 ( ) $ ping -c 4 192.168.100.2 connect: Network is unreachable 2.8: ifdown OS ifdown 2.8 eth0 2.4 PC /etc/network/interfaces.d/eth0 2.2 IP eth0 2.1 ifup IP ifdown ifup ifup /etc/network/interfaces.d #eth0# emacs emacs ifup eth0 #eth0# emacs #eth0# ifup 2.6 1.1 (p.7) PC Hub ( Hub) 2.9 Hub ( Hub) (cascading connection) Hub ( Hub) PC 4 (8 ) ( ) 100Mbps 24
1 1 2.10 PC Hub PC Hub PC MDI (Medium Dependent Interface) Hub MDI-X (MDI Crossover) Hub 2.10 MDI- X Hub PC Hub 2.10 MDI MDI-X ( 2.10 ) MDI-X ( MDI) ( 2.10 ) Switching Hub Switching Hub pc1 cascading connection pc2 2.9: Switching Hub Switching Hub Switching Hub MDI-X MDI-X MDI-X MDI pc1 MDI-X Switching Hub MDI-X Switching Hub 2.10: Hub ( Hub) Hub ( Hub) MDI ( 25
) Hub (CentreCOM FH708TP) 8 X PC MDI-X PC = HUB MDI Hub PC Hub 8 MDI MDI-X Hub ( Hub) Hub (CentreCOM FS708EX V1 Buffalo LSW-TX-8NS) AUTO MDI/MDI-X 2.7 Hub 2 Hub 2 PC 2.9 ping 1. 1 8 ( X PC ) 2. 1 8 ( = HUB ) 26