思科路由器配置串口

优质回答与知识(10)

比如外网是200.100.100.1 内网是192.168.0.0网段的我只写上大概步骤①设置外部端口IP interface s0/0ip add 200.100.100.1 255.255.255.0②设置内部端口IPinterface f0/0ip add 192.168.0.1 255.255.255.0③定义内部网络允许访问外网的ACL 如:access-list 1 permit 192.168.0.0 0.0.0.255④定义IP地址池ip nat pool name 200.100.100.1 200.100.100.1 netmask 255.255.255.0 (name那个是名字 可以自己定义)⑤指定网络地址转换映射ip nat inside source list 1 pool name overload⑥在内部和外部启用nat外:interface s0/0ip nat outside内:int f0/0ip nat inside 我只写上配置nat的主要步骤 配置端口IP、启用端口那些就自己配置一下就行了追问您写的跟我现在的写的不是一样的么?但是我现在172.21.0.0网段不能访问外网的19.0.0.0网段!不知道哪里没有定义好!!

2020-08-29 22:21:44

PC机,路由器接口的IP地址我就不用写要怎麼配置了。连线这些我也不用多说,相信你也会。这里主要配置是switch0到R1的单臂路由的配置。给你看一下交换机和路由器的配置:switch0:(注:PC1-FA0/1、PC2-FA0/2、G1/1-R1、G1/2-SWITCH1) interface FastEthernet0/1 switchport access vlan 10 switchport mode access!interface FastEthernet0/2 switchport access vlan 20 switchport mode access!interface GigabitEthernet1/1 switchport mode trunk!interface GigabitEthernet1/2 switchport mode trunkswitch1:(注:PC3-FA0/1、PC4-FA0/2、G1/2-SWITCH0)interface FastEthernet0/1 switchport access vlan 10 switchport mode access!interface FastEthernet0/2 switchport access vlan 20 switchport mode access!interface FastEthernet0/8!interface GigabitEthernet1/2 switchport mode trunkR1配置:(FA0/0-SWITCH1 , S0/0-R2-这个口配置波特率为9600)interface FastEthernet0/0.10 encapsulation dot1Q 10 ip address 192.168.10.1 255.255.255.0!interface FastEthernet0/0.20 encapsulation dot1Q 20 ip address 192.168.20.1 255.255.255.0(以上为单臂路由配置,为问题2的重点配置)interface Serial0/0 ip address 172.16.2.1 255.255.0.0 clock rate 9600!!router rip network 172.16.0.0 network 192.168.10.0 network 192.168.20.0!ip route 0.0.0.0 0.0.0.0 172.16.2.2 R2配置:(FA0/0-PC5 , S0/0-R1)interface FastEthernet0/0 ip address 202.99.8.1 255.255.255.0 duplex auto speed auto!interface Serial0/0 ip address 172.16.2.2 255.255.0.0!interface Serial0/1 no ip address shutdown!router rip network 172.16.0.0 network 202.99.8.0ip route 0.0.0.0 0.0.0.0 172.16.2.1 测试:1、查看R1的路由表Router#sh ip routCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is 172.16.2.2 to network 0.0.0.0C 172.16.0.0/16 is directly connected, Serial0/0C 192.168.10.0/24 is directly connected, FastEthernet0/0.10C 192.168.20.0/24 is directly connected, FastEthernet0/0.20R 202.99.8.0/24 [120/1] via 172.16.2.2, 00:00:19, Serial0/0S* 0.0.0.0/0 [1/0] via 172.16.2.22、查看R2的路由表:Router#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static routeGateway of last resort is 172.16.2.1 to network 0.0.0.0C 172.16.0.0/16 is directly connected, Serial0/0R 192.168.10.0/24 [120/1] via 172.16.2.1, 00:00:25, Serial0/0R 192.168.20.0/24 [120/1] via 172.16.2.1, 00:00:25, Serial0/0C 202.99.8.0/24 is directly connected, FastEthernet0/0S* 0.0.0.0/0 [1/0] via 172.16.2.13、 PC1 ping PC5:PC>ping 202.99.8.3Pinging 202.99.8.3 with 32 bytes of data:Reply from 202.99.8.3: bytes=32 time=141ms TTL=126Reply from 202.99.8.3: bytes=32 time=125ms TTL=126Reply from 202.99.8.3: bytes=32 time=125ms TTL=126Reply from 202.99.8.3: bytes=32 time=125ms TTL=126Ping statistics for 202.99.8.3: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 125ms, Maximum = 141ms, Average = 129ms4 、 PC4 ping PC5 :PC>ping 202.99.8.3Pinging 202.99.8.3 with 32 bytes of data:Reply from 202.99.8.3: bytes=32 time=234ms TTL=126Reply from 202.99.8.3: bytes=32 time=156ms TTL=126Reply from 202.99.8.3: bytes=32 time=141ms TTL=126Reply from 202.99.8.3: bytes=32 time=141ms TTL=126Ping statistics for 202.99.8.3: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 141ms, Maximum = 234ms, Average = 168ms以上测试通过,若无疑问,希望能及时采纳!

2020-08-29 22:10:58

如果是初次配置提示是否进入设置模式,选择NO按以下顺序输入:enable //进入特权模式config t//全局模式int f0/0 //进入F0/0接口ip add 192.168.1.1 255.255.255.0//接口配置IP和子网掩码no shutdown//接口开启

2020-08-29 20:40:14

在全局配置模式下do show runn ,看你以前的IP在哪个接口下然后进这个接口如(interface s0/0/0)然后no ip add -----把以前的IP地址删掉然后在此接口下添加你的新IP地址和掩码如(ip add 1.1.1.1 255.255..0.0)接着把你以前的PAT改下追问给个具体代码吧!以前外网0/0,内网0/1,现在的外网ip:123.149.248.***,掩码255.255.255.252,网关123.149.248.***-1追答enconf t-------进全局模式inter f(或E,S,G等等看你接口)0/0no ip addip add 123.149.248.*** 255.255.255.252 -------(此处输入新IP 和掩码)exit---------退到全局下ip nat pool 456 123.149.248.*** 123.149.248.*** netmask 123.149.248.***access 13 permit anyip nat inside source list 13 pool 456 overloadip route 0.0.0.0 0.0.0.0 123.149.248.***----------此处IP是你的下一跳IP,就是服务商那头的IP地址大致过程是上面的,具体还要实际情况看

2020-08-29 22:11:31

enconf terinter fa0/0no ip add 123.149.248。。。。。。。ip add 新的。。。。。no shutexit还有要做nat,,这个要根据现有配置

2020-08-29 20:46:07

静态路由的话需要全都跳一遍不建议你使用。rip或者ospf都可以。如果你是为了完成作业的话,你可以直接老师。这样更直观

2020-08-29 22:03:49

你想问啥 路由上的还是交换上的?

2020-08-29 21:57:54

迈普路由器不太了解,感觉你最后这个NAT只是指出了inside , outside 不需要指出吗?

2020-08-29 22:35:39

使用策略路由比如vlan 10ip access-list extended vlan10_gateway permit ip 192.168.1.0 0.0.0.255 anyroute-map routemap_vlan10 match ip vlan10_gateway set ip next-hop 1.1.1.2 //(s0/0/0的对端地址)比如vlan20ip access-list extended vlan20_gateway permit ip 172.16.0.0 0.0.0.255 anyroute-map routemap_vlan20 match ip vlan20_gateway set next-hop 2.2.2.1 //(s0/0/1的对端地址)#在子接口中绑定route-map int f0.1 ip policy route-map routemap_vlan10 interface f0.2 ip policy route-map routemap_vlan20

2020-08-29 22:25:20

如果直接必须在相同网段或者都有ISP接入走TUNNLE,追问你好,要是不考虑网段,我这个配置有问题吗?追答看你的需求才知道是否有问题。

2020-08-29 20:44:16

相关问题