transceiver. transceiver AUI , . 4.4.2. Ethernet HOWTOs comp.os.linux.announce Paul Gortmaker. , Linux. HOWTO . , , HOWTO; . , DMA- Ethernet DMA Adaptec 1542 SCSI . DMA , , Ethernet . - 65 - 3Com EtherLink 3c503 3c503/16, - 3c507 3c509. 3c501 , , . Novell Eagle NE1000 NE2000, . NE1500 NE2100 . Western Digital/SMC WD8003 WD8013 ( SMC Elite SMC Elite Plus) SMC Elite 16 Ultra. Hewlett Packard HP 27252, HP 27247B HP J2405A. D-Link DE-600 pocket adaptor, DE-100, DE-200, DE-220-T.. DE-650-T, PCMCIA . (4) DEC DE200 (32K/64K), DE202, DE100, DEPCA rev E. Allied Teliesis AT1500 and AT1700. , Linux . . , , . 4.4.3. Ethernet , Linux . : ------------------------------------------------------ +--------------+-------------------------------------+ | | | +--------------+-------------------------------------+ |WD/SMC | 0x300, 0x280, 0x380, 0x240 | - 66 - |SMC 16 Ultra | 0x300, 0x280 | |3c501 | 0x280 | |3c503 | 0x300, 0x310, 0x330, 0x350, 0x250, | | | 0x280, 0x2a0, 0x2e0 | |NEx000 | 0x300, 0x280, 0x320, 0x340, 0x360 | |HP | 0x300, 0x320, 0x340, 0x280, 0x2C0, | | | 0x200, 0x240 | |DEPCA | 0x300, 0x320, 0x340, 0x360 | +--------------+-------------------------------------+ +--------------+-------------------------------------+ autoprobing. , . , WD80x3 . o , . , autoprobe , . Net-3, o , drivers/net/Space.c , . , . o , . lilo , , lilo.conf. Ethernet , : ether=irq,base addr,param1,param2,name , - . ; , . IRQ . , IRQ . 3c503 - 67 - , IRQ ( 5, 9, 3, 4) . addr - ; . - . WD80x3, . param1 . 1 7 , 8 ; 0 . 3c503 param2 transceiver ( ) transceiver ( 1). BNC; -- AUI . Ethernet , , lilo. , , , . , lilo - . , Linux Ethernet 0x300 eth1, : Reserve=0x300,32 ether=0,0x300, eth1 reserve - . : Reserve=0x340,32 ether=0,0x340, eth0 autoprobing , addr -1: - 68 - Ether=0,-1, eth0 4.5. PLIP PLIP IP , . 10/c 20/. PLIP Crynwr. : PC ; PC . PLIP , , , - . mode zero PLIP (0 PLIP). , . , PLIP , 1 8 . , Linux 0 . PLIP, PLIP Crynwr, PLIP NCSA telnet. PLIP, -- "Null Printer" "Turbo Laplink" . . 20.3 . LIP . Niibe Yutaka. PLIP , , plip0 lp0, plip1 -- lp1, ... : - 69 - -------------------------------- +-----------+-----------+------+ | | I/O | IRQ | +-----------+-----------+------+ |plip0 | 0x3BC | 7 | |plip1 | 0x378 | 7 | |plip2 | 0x278 | 5 | +-----------+-----------+------+ +-----------+-----------+------+ -, drivers/net/Space.c Linux, . , , . PLIP , . 4.6. SLIP PPP SLIP (Serial Line IP), PPP ( Point-to-Point ) - IP . SLIP PPP Internet, IP . SLIP PPP, . . 5. . - 70 - 5. , - , PC T1 Internet . , SLIP , UUCP , (BBS), . , . , , , . Serial HOWTO Greg Hankins, comp.os.linux.announce. 5.1. Linux. -- , . Unix -- kermit. , , , ... -- minicom, DOS. - , seyon. , linux- BBS , . sunsite.unc.edu /pub/Linux/system/Network. , , - 71 - . , , , BBS. , - , . -- UUCP. UUCP -- , , , ... . Ian Taylor's UUCP , Linux, . , , Fido. Fido ifmail . SLIP - - . SLIP - SLIP , FTP , ... SLIP -, ISDN. 5.2. Unix , ttys. - Teletype(tm), . . , . Linux tty: () , ( , - 72 - X11) . ttys, ; - . Ttys ioctl . , , . -- . , .. Tty , . , SLIP Linux . . - bit rate( ), ( bps ). , (Baud), . , , . , . , . , . 5.3. Unix , , /dev. , , , . , -. - 73 - , ; 4, ttyS0, ttyS1, ... ; cua0, .., 5. . COM1 COM4, COM 63. , , Serial Howto. , COM2. 65, 5. , cua1 . ttys /dev. 5 6 , : $ ls -l /dev/cua* crw-rw-rw- 1 root root 5, 64 Nov 30 19:31 /dev/cua0 crw-rw-rw- 1 root root 5, 65 Nov 30 22:08 /dev/cua1 crw-rw-rw- 1 root root 5, 66 Oct 28 11:56 /dev/cua2 crw-rw-rw- 1 root root 5, 67 Mar 19 1992 /dev/cua3 , : - # mknod -m 666 /dev/cua1 c 5 65 # chown root.root /dev/cua1 /dev/modem , , cua1. , modem , . - (lock files) , . , cua1, , LCK..cua1. - 74 - , , . , . 5.4. . Linux , RS-232. RS-232 PC. handshake , . , . "Clear to Send" ( CTS) "Ready to Send"( RTS), , , handshake , "RTS/CTS". PC, RS-232 UART , 16450 , , NSC 16550A. ( Rockwell) , , 16550-. 16450 16550 , FIFO 16 , 1 16450 9600 , 16550. , Linux 8250 , PC-AT. , COM1 COM4. 64 67, . - 75 - -, Ted Tso's setserial rc.serial . /etc/rc . setserial . rc.serial : # /etc/rc.serial - serial line configuration script. # # Do wild interrupt detection /sbin/setserial -W /dev/cua* # Configure serial devices /sbin/setserial /dev/cua0 auto irq skip test autoconfig /sbin/setserial /dev/cua1 auto irq skip test autoconfig /sbin/setserial /dev/cua2 auto irq skip test autoconfig /sbin/setserial /dev/cua3 auto irq skip test autoconfig # Display serial device configuration /sbin/setserial -bg /dev/cua* , setserial . , setserial -bg , , . Rockwell . , , UART NSC 16450, NSC 16550, /sbin/setserial /dev/cua1 auto irq skip test autoconfig uart 16550 - 76 - , IRQ COM . man , setserial(8). handshake, , . . . rc.serial , stty: $ Stty crtscts < /dev/cua1 handshake $ Stty -a < /dev/cua1 ; -crtscts . . - 77 - 6. TCP/IP , TCP/IP . IP TCP/IP , , . , . , , . TCP/IP, , . /etc/rc . , rc.net rc.inet. , rc.inet1 rc.inet2, , . . , rc.inet1, . , , TCP/IP . rc.inet1 , rc.inet1 , . rc , Linux . 6.1. proc Net-2 proc. proc -- , - 78 - . , . loadavg, meminfo, . , e . , ARP , TCP , . . Proc ( procfs) /proc. o , /etc/fstab: # procfs mont point: none /proc proc defaults "mount /proc" /etc/rc . Procfs . procfs , "mount: fs type procfs not supported by kernel". "" procfs. 6.2. - Linux , . , , , . , . , . - 79 - netXXX.tar.gz, XXX - . Linux 1.0 -- 0.32b, ( 1.1.12 ) 0.32d. TCP/IP , Linux FTP . Net-BSD . , Xmosaic, xarchie, Gopher IRC . , . FTP Net-3 -- sunacm.swan.ac.uk, sunsite.unc.edu system/Network/sunacm. Net-2e ftp.aris.com. Matthias Urlichs bsd ftp.ira.uka.de /pub/system/linux/netbsd. 6.3. , , Groucho Marx , , . , , . , , PC, Linux 1.0. , , , . Ethernet. , . , gateway, . , UUCP . , SLIP Internet. 6.4. , , , - 80 - . # hostname name , . , vale.vbrew.com, vlager.vbrew.com, ... , . -- , vale. , IP , resolver IP . /etc/hosts ( . ). domainname, FQDN. , hostname domainname FQDN. , . domainname NIS , DNS , . NIS 11 .. 6.5. IP (, INN netnews ), , IP loopback, 127.0.0.1. , IP . , IP . - 81 - IP . , , , IP . Internet, . , A, B, C, . , Internet, IP . o , . Internet, hostmaster@internic.net. Ethernet ( ), . , , ; Point-to-point . , Ethernet SLIP , . 8.. , NIC , 191.72.0.0. Ethernet, . , 254 . 1 2 -- . 191.72.1.0 191.72.2.0. 255.255.255.0. Vlager, gateway , , 1 , IP 191.72.1.1 191.72.2.1, . , gateway. B ; C . , , - 82 - C . , 2 , 64 . 6.6. hosts networks , , /etc/hosts. DNS NIS , hosts . DNS NIS, /etc/hosts. , , . , rc.inet . , IP , , rc . , hosts, gateways NIS , . , , , resolver hosts. DNS NIS , . /etc/hosts IP , /etc/host.conf. , order order hosts resolver 7. hosts , IP , . - 83 - , . , (#), . . vale, , vale.vbrew.com vale , , . . , vlager-if1 vlager-if2, vlager. # # Hosts file for Virtual Brewery/Virtual Winery # # IP local fully qualified domain name # 127.0.0.1 localhost # 191.72.1.1 vlager vlager.vbrew.com 191.72.1.1 vlager-if1 191.72.1.2 vstout vstout.vbrew.com 191.72.1.3 vale vale.vbrew.com # 191.72.2.1 vlager-if2 191.72.2.2 vbeaujolais vbeaujolais.vbrew.com 191.72.2.3 vbardolino vbardolino.vbrew.com 191.72.2.4 vchianti vchianti.vbrew.com IP , . , /etc/networks . , : - 84 - # /etc/networks for the Virtual Brewery brew-net 191.72.1.0 wine-net 191.72.2.0 6.7. IP , , . , . rc.inet1 , . ifconfig ( "" ), route. fconfig , IP , "taking up". , IP datagrams . # ifconfig interface ip-address ip- . , IP , 255.255.0.0 B . ifconfig . route . route [add|del] target add del . - 85 - 6.7.1. loopback -- loopback: # ifconfig lo 127.0.0.1 , localhost IP . ifconfig hosts , , 127.0.0.1: # Sample /etc/hosts entry for localhost localhost 127.0.0.1 , ifconfig : $ ifconfig lo lo Link encap Local Loopback inet addr 127.0.0.1 Bcast [NONE SET] Mask 255.0.0.0 UP BROADCAST LOOPBACK RUNNING MTU 2000 Metric 1 RX packets 0 errors 0 dropped 0 overrun 0 TX packets 0 errors 0 dropped 0 overrun 0 , loopback netmask 255.0.0.0, 127.0.0.1 -- A . , , - loopback. , rwhod , loopback rwho . " ifconfig". , -"". -- , IP, 127.0.0.1. - 86 - # route add 127.0.0.1 , localhost IP . , , , ping. ping - (sonar) IP , . roundtrip time. # ping localhost PING localhost (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp seq=0 ttl=32 time=1 ms 64 bytes from 127.0.0.1: icmp seq=1 ttl=32 time=0 ms 64 bytes from 127.0.0.1: icmp seq=2 ttl=32 time=0 ms ^C --- localhost ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0/0/1 ms ping, . ^C Ctrl-C. , 127.0.0.1 ping . . ping , . . ifconfig , , , , , ( /proc/net ). , "Network unreachable" , route. - 87 - , ifconfig.