
有关思科路由器的问题??高手请进!!!
请问Router(config)#和Router#到底哪个是全局配置模式,那Router(config)#enablesecretphy123的意思就是在特权配置模式的配...
请问Router(config)#和Router#到底哪个是全局配置模式,那Router(config)#enable secret phy123的意思就是在特权配置模式的配置,也就是说Router(config)#是特权配置模式,但是我在一本书上看到在Router(config)#全局配置模式上加exit 即Router(config)#exit可以退到全局配置模式Router#, 那这不是与上面的相矛盾了吗?到底怎样理解呀?
展开
1个回答
展开全部
步骤1:配置路由器
设置口令:
router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname <hostname> ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令为 xxx
router(config)#enable password xxx ;设置特权非密口令为 xxx
router(config)#int fastethernet0/0 ;配置接口0
router(config-if)#ip address 192.168.0.1 255.255.255.0 ;设置接口0的IP地址及子网掩码
router(config-if)#no shutdown ;激活接口0
router(config)#exit ;返回特权模式
router#exit ;返回用户模式
路由器显示命令:
router#show run ;显示接口
router#show interface ;显示接口
步骤2:配置主机A
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.0.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.0.1 ;设置网关
[root#PCA root]#route ;查看网关
步骤3:配置主机B
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.1.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.1.1 ;设置网关
[root#PCA root]#route ;查看网关
步骤4:静态路由配置
配置路由器的接口IP地址:
router(config)#int f0/0
router(config-if)#ip address 192.168.0.1 255.255.255.0
router(config-if)#no shutdown
router(config)#int f0/1
router(config-if)#ip address 192.168.1.1 255.255.255.0
router(config-if)#no shutdown
静态路由配置
router(config)#ip route 192.168.0.0 255.255.255.0 fastethernet0/0
router(config)#ip route 192.168.1.0 255.255.255.0 fastethernet0/1
router#show ip route ;查看路由信息
静态路由配置
主机A上ping 192.168.1.2
主机B上ping 192.168.0.2
步骤5:动态路由RIP配置
配置主机A
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.1.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.1.1 ;设置网关
[root#PCA root]#route ;查看网关
配置主机B
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.2.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.2.1 ;设置网关
[root#PCA root]#route ;查看网关
配置路由器1的接口IP地址:
router(config)#int f0/0
router(config-if)#ip address 10.0.0.1 255.255.255.0
router(config-if)#no shutdown
router(config)#int f0/1
router(config-if)#ip address 192.168.1.1 255.255.255.0
router(config-if)#no shutdown
配置路由器2的接口IP地址:
router(config)#int f0/0
router(config-if)#ip address 10.0.0.2 255.255.255.0
router(config-if)#no shutdown
router(config)#int f0/1
router(config-if)#ip address 192.168.2.1 255.255.255.0
router(config-if)#no shutdown
配置路由器1的路由协议RIP:
router(config)#ip routing
router(config)#router rip
router(config-router)#network 192.168.1.0
router(config-router)#network 192.168.2.0
router(config-router)#network 10.0.0.0
配置路由器2的路由协议RIP:
router(config)#ip routing
router(config)#router rip
router(config-router)#network 192.168.1.0
router(config-router)#network 192.168.2.0
router(config-router)#network 10.0.0.0
偶的配置命令,希望对你有用!
设置口令:
router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname <hostname> ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令为 xxx
router(config)#enable password xxx ;设置特权非密口令为 xxx
router(config)#int fastethernet0/0 ;配置接口0
router(config-if)#ip address 192.168.0.1 255.255.255.0 ;设置接口0的IP地址及子网掩码
router(config-if)#no shutdown ;激活接口0
router(config)#exit ;返回特权模式
router#exit ;返回用户模式
路由器显示命令:
router#show run ;显示接口
router#show interface ;显示接口
步骤2:配置主机A
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.0.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.0.1 ;设置网关
[root#PCA root]#route ;查看网关
步骤3:配置主机B
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.1.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.1.1 ;设置网关
[root#PCA root]#route ;查看网关
步骤4:静态路由配置
配置路由器的接口IP地址:
router(config)#int f0/0
router(config-if)#ip address 192.168.0.1 255.255.255.0
router(config-if)#no shutdown
router(config)#int f0/1
router(config-if)#ip address 192.168.1.1 255.255.255.0
router(config-if)#no shutdown
静态路由配置
router(config)#ip route 192.168.0.0 255.255.255.0 fastethernet0/0
router(config)#ip route 192.168.1.0 255.255.255.0 fastethernet0/1
router#show ip route ;查看路由信息
静态路由配置
主机A上ping 192.168.1.2
主机B上ping 192.168.0.2
步骤5:动态路由RIP配置
配置主机A
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.1.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.1.1 ;设置网关
[root#PCA root]#route ;查看网关
配置主机B
PCA login:root
password:linux
[root@PCA root]#ifconfig eth0 192.168.2.2 netmask 255.255.255.0 ;设置 IP
[root@PCA root]#ifconfig ;查看 IP
[root#PCA root]#route add default gw 192.168.2.1 ;设置网关
[root#PCA root]#route ;查看网关
配置路由器1的接口IP地址:
router(config)#int f0/0
router(config-if)#ip address 10.0.0.1 255.255.255.0
router(config-if)#no shutdown
router(config)#int f0/1
router(config-if)#ip address 192.168.1.1 255.255.255.0
router(config-if)#no shutdown
配置路由器2的接口IP地址:
router(config)#int f0/0
router(config-if)#ip address 10.0.0.2 255.255.255.0
router(config-if)#no shutdown
router(config)#int f0/1
router(config-if)#ip address 192.168.2.1 255.255.255.0
router(config-if)#no shutdown
配置路由器1的路由协议RIP:
router(config)#ip routing
router(config)#router rip
router(config-router)#network 192.168.1.0
router(config-router)#network 192.168.2.0
router(config-router)#network 10.0.0.0
配置路由器2的路由协议RIP:
router(config)#ip routing
router(config)#router rip
router(config-router)#network 192.168.1.0
router(config-router)#network 192.168.2.0
router(config-router)#network 10.0.0.0
偶的配置命令,希望对你有用!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询