《GNS3 路由器模拟 访问外网》

1、配置ISP:
ISP#conf t
ISP(config)#int f0/0
ISP(config-if)#ip add 10.1.1.1 255.255.255.0
ISP(config-if)#no shut
ISP(config-if)#exir
ISP(config)#int l 0
ISP(config-if)#ip add 1
ISP(config-if)#ip add 1.1.1.1 255.255.255.0
ISP(config-if)#no shut
ISP(config-if)#do show ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            10.1.1.1        YES manual up                    up
FastEthernet1/0            unassigned      YES unset  administratively down down
Loopback0                  1.1.1.1         YES manual up                    up

2、GW配置:
GW#
GW#conf t
GW(config)#int f0/0
GW(config-if)#ip add 10.1.1.2 255.255.255.0
GW(config-if)#no shut
GW(config-if)#exit
GW(config)#int f1/0
GW(config-if)#ip add 192.168.1.1 255.255.255.0
GW(config-if)#no shut
GW(config-if)#exit


GW(config)#do ping  10.1.1.1
 Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 32/47/60 ms



GW(config)#do ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 28/33/40 ms
GW(config)#
GW(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.1

GW(config)#do ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/48/64 ms
GW(config)#int f0/0
GW(config-if)#ip nat outside
GW(config-if)#exit
GW(config)#int f1/0
GW(config-if)#ip nat inside
GW(config-if)#exit
GW(config)#access-list 1 permit any
GW(config)#ip nat inside source static 192.168.1.2 10.1.1.2
GW(config)#exit


3、PC配置:
PC#conf t
PC(config)#int f0/0
PC(config-if)#ip add 192.168.1.2 255.255.255.0
PC(config-if)#no shut
PC(config-if)#exi
PC(config)#no ip routing
PC(config)#ip default-gateway 192.168.1.1
Default gateway is 192.168.1.1

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty
PC(config)#exit
PC#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/85/108 ms
PC#ping 10.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/96/112 ms


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值