思科路由器ntp配置

优质回答与知识(10)

ntp master

2020-08-29 21:29:44

NTP(Network Time Protocol,网络时间协议)是基于RFC1305的协议,是一个跨越广域网或局域网的复杂的同步时间协议。一般情况下建议配置在路由器上,当然配置在其它设备上都是可以的。接下来我们根据下面的拓扑图来看一下在路由器上配置NTP服务器的方法以及交换机、windows服务器、Linux服务器如何设置NTP客户端。拓扑如下:路由器NTPserver上配置如下:R1>enR1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#hostname NTPserverNTPserver(config)#no ip do loNTPserver(config)#line con 0NTPserver(config-line)#exec-t 0 0NTPserver(config-line)#logg synNTPserver(config-line)#exitNTPserver(config)#int e0/1NTPserver(config-if)#int e0/0NTPserver(config-if)#exiNTPserver(config)#int e0/0NTPserver(config-if)#ip ad 192.168.1.1 255.255.255.0NTPserver(config-if)#no shutNTPserver(config-if)#*Mar 1 00:02:39.959: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up*Mar 1 00:02:40.959: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to upNTPserver(config-if)#clock timeNTPserver(config-if)#do wrBuilding configuration...[OK]NTPserver(config-if)#exitNTPserver(config)#clocNTPserver(config)#clock timeNTPserver(config)#clock timezone peking +8NTPserver(config)#*Mar 1 00:03:27.019: %SYS-6-CLOCKUPDATE: System clock has been updated from 00:03:27 UTC Fri Mar 1 2002 to 08:03:27 peking Fri Mar 1 2002, configured from console by console.NTPserver(config)#exitNTPserver#*Mar 1 00:04:02.975: %SYS-5-CONFIG_I: Configured from console by consoleNTPserver#clocNTPserver#clock set 12:02:20 6 Aug 2012NTPserver#*Aug 6 04:02:20.003: %SYS-6-CLOCKUPDATE: System clock has been updated from 08:04:45 peking Fri Mar 1 2002 to 12:02:20 peking Mon Aug 6 2012, configured from console by console.NTPserver#conf tEnter configuration commands, one per line. End with CNTL/Z.NTPserver(config)#ntp master

2020-08-29 20:15:00

比如外网是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

相关问题