Article Title: General router configuration under slackware. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Manually test the irq and I/O of the NIC.
Assume that both of your NICs are isa and ne2000 compatiable.
~~ (The pci NIC may not have the following problems. please advise)
Modprobe ne io = 0x ***, 0x ***
For example, if my Nic io is 0x240, and 0 x, then:
Modprobe ne io = 0x300,0x240
Result:
NE * 000 ethercard probe at 0x300: 00 88 cc 02 53 41
Eth0: NE2000 found at 0x300, using IRQ 3.
NE * 000 ethercard probe at 0x240: 00 00 21 e4 ea 16
Eth1: NE2000 found at 0x240, using IRQ 10.
At this time, you are not sure whether the network card is working properly, you should check:
Cat/proc/interrupts; cat/proc/ioports;
Under normal circumstances, my Nic should be as follows:
0240-025f: NE2000
0300-031f: NE2000
3: 3789642 XT-PIC NE2000
~~~~ It should not be zero !!!
4: 4 XT-PIC serial
8: 1 XT-PIC rtc
10: 2573000 XT-PIC NE2000
~~~~ It should not be zero !!!
If zero occurs, set the NIC with the driver (under dos)
Set irq, io, and jumpless !!!
Now, repeat (1.
2. Manually test network configurations
(1) ip address allocation
Ifconfig eth0 ***. *** netmask 255.255.255 .*
Ifconfig eth1 ***. 1
For example:
Ifconfig eth0 202.38.71.139 netmask 255.255.255.128
Ifconfig eth1 192.168.2.1
Ifconfig
The normal situation is as follows:
Eth0 Link encap: Ethernet HWaddr 00: 88: CC: 02: 53: 41
Inet addr: 202.38.71.139 Bcast: 202.38.71.255
Mask: 255.255.255.128
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 2164864 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 1791274 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 29298 txqueuelen: 100
Interrupt: 3 Base address: 0x300
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 906313 errors: 0 dropped: 0 overruns: 0 frame: 1041
TX packets: 1780146 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 214648 txqueuelen: 100
Interrupt: 10 Base address: 0x240
(2) route configuration
Route add default gw 202. 38 .***.***
Mine is as follows:
Route add default gw 202.38.71.190
Execute route. normal status:
Destination Gateway Genmask Flags Metric
Ref Use Iface
Localnet * zookeeper 255.128 U 0
0 0 eth0
192.168.2.0*255.255.255.0 U 0
0 0 eth1
Loopback * 255.0.0.0 U 0
0 0 lo
Default 202.38.71.190 0.0.0.0 UG 0
0 0 eth0
(3) test
Internal communication:
On the server,
Ping 202.38.64.10
Ping 192.168.2. * (ip address of a machine in the internal subnet)
The result is that the network is connected.
External:
On an internal machine (for example, 192.168.2.2)
Ping 202.38.64.10
As a result, it may not be possible, so I have 3 below to prepare forward.
3. prepare ip_forward.
Echo 1>/proc/sys/net/ipv4/ip_forward
Ipfwadm-F-a m-B-S 192.168.2.0/24-D 0.0.0.0/0
Now, on an internal machine (for example, 192.168.2.2)
Ping 202.38.64.10
The result should be successful.
4. Vro is automatically configured.
Write the commands used above to rc. local,
Attention order: modprobe --> ifconfig --> route --> ip_forward
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service