实验七 直联路由
system
password:
[Quidway]interface ethernet0
[Quidway-Ethernet0]ip addr 10.65.1.2 255.255.255.0
[Quidway-Ethernet0]undo shutdown
[Quidway-Ethernet0]int e1
[Quidway-Ethernet1]ip addr 10.66.1.2 255.255.255.0
[Quidway-Ethernet1]undo shutdown
[root@PCA root]#ifconfig eth0 10.65.1.1 netmask 255.255.0.0
[root@PCB root]#ifconfig eth0 10.66.1.1 netmask 255.255.0.0
[root@PCA root]#ping 10.65.1.2 (通,没有关只能ping直连的口)
[root@PCA root]#ping 10.66.1.2 (不通,PCA 没有设置网关)
[root@PCA root]#route add default gw 10.65.1.2
[root@PCA root]#ping 10.66.1.2 (通)
[root@PCA root]#ping 10.66.1.1 (不通,因PCB没有网关)
[root@PCB root]#route add default gw 10.66.1.2
[root@PCA root]#ping 10.66.1.1 (通) 实验到这里,在这里我却不通 不知道为什么呢在这里插入图片描述
这里是我pcb 计算机的真正动作
ed Hat Linux release 7.3 (Valhalla)
Kernel 2.4.18-3 on an i686
PCB login: root
password: linux
[root@PCB root]# dis cur
?
[root@PCB root]# route add default gw 10.66.1.2
[root@PCB root]# ping 10.66.1.2
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.207 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.100 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
4packets transmitted, 4 received, 0% loss, time 2000ms
PCB login:
?
[root@PCB root]# ping 10.66.1.2
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.207 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.100 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
4packets transmitted, 4 received, 0% loss, time 2000ms
[root@PCB root]# ping 10.66.1.3
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
4packets transmitted, 0 received, 100% loss, time 2000ms
[root@PCB root]# ping 10.65.1.2
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.207 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.100 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
4packets transmitted, 4 received, 0% loss, time 2000ms
[root@PCB root]# ping 10.65.1.1
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
4packets transmitted, 0 received, 100% loss, time 2000ms
[root@PCB root]# ifconfig eth0 10.65.1
?
[root@PCB root]# ifconfig eth0 10.66.1.1 netmask 255.255.255.0
[root@PCB root]# ping 10.66.1.2
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.207 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.100 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
4packets transmitted, 4 received, 0% loss, time 2000ms
[root@PCB root]# ping 10.65.1.1
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
4packets transmitted, 0 received, 100% loss, time 2000ms
[root@PCB root]# ping 10.66.1.3
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
4packets transmitted, 0 received, 100% loss, time 2000ms
[root@PCB root]# ping 10.66.1.2
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.207 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.100 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
64 bytes from 10.66.1.1: icmp_seq=1 ttl=128 time=0.96 ms
4packets transmitted, 4 received, 0% loss, time 2000ms
[root@PCB root]# ping 10.65.1.1
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
From 10.66.1.1 icmp_seq=1 Destination Host Unreachable
4packets transmitted, 0 received, 100% loss, time 2000ms
[root@PCB root]#