- 论坛徽章:
- 5
|
下面我帖出我的实验配置及结果:
环境如下:
一台装有FC6的IBM笔记本链接到一台装有FC6的双网卡的LINUX网关的ETH0卡,网段为10.0.0.0/8。另有一台装有XP的台式计算机,链接到了该LINUX网关的ETH1卡,网段为192.168.0.0/24。
三台机器的配置分别如下:
一)笔记本:
1、网卡的IP配置:
eth0 Link encap:Ethernet HWaddr 00:10:A4:89:86:B1
inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::210:a4ff:fe89:86b1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2306 (2.2 KiB) TX bytes:12420 (12.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:847 errors:0 dropped:0 overruns:0 frame:0
TX packets:847 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1554924 (1.4 MiB) TX bytes:1554924 (1.4 MiB)
2、路由表的配置
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
3、没有开任何服务,没有开任何防火墙。
二)LINUX网关的配置:
1、网络部分的配置:
eth0 Link encap:Ethernet HWaddr 00:05:01:01:01:12
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::205:1ff:fe01:112/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13607 (13.2 KiB) TX bytes:3776 (3.6 KiB)
Interrupt:12 Base address:0xe000
eth1 Link encap:Ethernet HWaddr 00:05:01:01:01:10
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::205:1ff:fe01:110/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:154 errors:0 dropped:0 overruns:0 frame:0
TX packets:154 errors:0 dropped:0 overruns:0 carrier:0
collisions:12 txqueuelen:1000
RX bytes:14959 (14.6 KiB) TX bytes:14152 (13.8 KiB)
Interrupt:5 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1388 (1.3 KiB) TX bytes:1388 (1.3 KiB)
2、路由表的配置
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
3、IPTABLES的配置
# Generated by iptables-save v1.3.5 on Mon May 21 04:26:25 2007
*filter
:INPUT ACCEPT [54:4380]
:FORWARD ACCEPT [42:3398]
:OUTPUT ACCEPT [0:0]
-A OUTPUT -j DROP
COMMIT
# Completed on Mon May 21 04:26:25 2007
4、该机器没有开任何其他的服务,当然打开了转发。
三、另一台XP机器的配置
1、网络部分的配置:
Windows IP Configuration
Host Name . . . . . . . . . . . . : bzd
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139 Famil
rnet NIC
Physical Address. . . . . . . . . : 00-E0-4C-E2-9D-03
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.0.88
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.254
DHCP Server . . . . . . . . . . . : 192.168.0.254
DNS Servers . . . . . . . . . . . : 192.168.0.254
Lease Obtained. . . . . . . . . . : 2007年5月20日 19:31:5
Lease Expires . . . . . . . . . . : 2007年5月21日 1:31:56
2、路由表的配置
C:\Documents and Settings\admin>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 e0 4c e2 9d 03 ...... Realtek RTL8139 Family PCI Fast Ethernet NIC -
数据包计划程序微型端口
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.254 192.168.0.88 30
10.0.0.0 255.0.0.0 192.168.0.1 192.168.0.88 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.88 192.168.0.88 30
192.168.0.88 255.255.255.255 127.0.0.1 127.0.0.1 30
192.168.0.255 255.255.255.255 192.168.0.88 192.168.0.88 30
224.0.0.0 240.0.0.0 192.168.0.88 192.168.0.88 30
255.255.255.255 255.255.255.255 192.168.0.88 192.168.0.88 1
Default Gateway: 192.168.0.254
===========================================================================
Persistent Routes:
None
3、没有防火墙。正在上CU论坛。
四)结果:
1、XP机器PING IBM笔记本
C:\Documents and Settings\admin>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=5ms TTL=63
Reply from 10.0.0.2: bytes=32 time=1ms TTL=63
Reply from 10.0.0.2: bytes=32 time<1ms TTL=63
Reply from 10.0.0.2: bytes=32 time=1ms TTL=63
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 5ms, Average = 1ms
2、IBM笔记本PING XP的机器:
PING 192.168.0.88 (192.168.0.8 56(84) bytes of data.
64 bytes from 192.168.0.88: icmp_seq=1 ttl=127 time=4.82 ms
64 bytes from 192.168.0.88: icmp_seq=2 ttl=127 time=1.75 ms
64 bytes from 192.168.0.88: icmp_seq=3 ttl=127 time=0.570 ms
64 bytes from 192.168.0.88: icmp_seq=4 ttl=127 time=1.72 ms
64 bytes from 192.168.0.88: icmp_seq=5 ttl=127 time=0.560 ms
64 bytes from 192.168.0.88: icmp_seq=6 ttl=127 time=2.78 ms
64 bytes from 192.168.0.88: icmp_seq=7 ttl=127 time=1.72 ms
64 bytes from 192.168.0.88: icmp_seq=8 ttl=127 time=0.938 ms
五)结论:
我不能在说结论了,大家自己看把。 |
|