思科路由器2600如何连接!

2020-10-15 科技 130阅读
连接计算机和路由器,以及路由器和外网接口,应注意级联线和直通线的用法。
首先确定f0/0与f0/1哪个是外网接口 哪个是内网接口
基本路由器配置命令

1.配置f0/0和f0/1的ip地址
Router>en 进入
Password: 输入密码 输入后看不见
Router#config t 进入特权配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface f0/0 进入f0/0接口
Router(config-if)#no shut 激活f0/0接口
Router(config-if)#ip address 172.16.0.246 255.255.255.0 配置IP地址
Router(config-if)#exit 退出
Router(config)#interface f0/1 进入f0/1接口
Router(config-if)#ip address 192.168.0.1 255.255.255.0 配置IP地址
Router(config-if)#no shut 激活f0/1接口
Router(config-if)#exit 退出
Router(config)#exit 退出
Router#
00:58:42: %SYS-5-CONFIG_I: Configured from console by console
Router#show run 查看运行状态
Building configuration...
==========================================================================
Current configuration : 850 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
logging console notifications
enable password cheng
!
ip subnet-zero
!
!
!
ip inspect audit-trail
ip audit notify log
ip audit po max-events 100
!
!
!
!
interface FastEthernet0/0 --------------------------------------
ip address 172.16.0.246 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.0.1 255.255.255.0
duplex auto
speed auto
!
interface Ethernet1/0
no ip address 注意每次查看的这些不同之处
ip broadcast-address 0.0.0.0
shutdown
half-duplex
!
ip classless
ip http server
ip pim bidir-enable
!
logging facility local3
logging 172.18.1.3
tacacs-server host 172.18.1.2
!
line con 0
line aux 0
line vty 0 4
login
! -------------------------------------
end
========================================================
---------------------------------------------------------------------------------------------------------------
2,配置路由和配置NAT内外接口(此包含了NAT转换的一些内容)
Router# 输入的en和密码就省去了 ~_~
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.0.254 配置路由信息 (此是一条缺省路由)
Router(config)#interface f0/0 进入F0/0接口
Router(config-if)#ip nat inside 把F0/0设置为接入口(inside)
Router(config-if)#exit
Router(config)#interface f0/1 进入F0/1接口
Router(config-if)#ip nat outside 把F0/1设置为接出口
Router(config-if)#exit
Router(config)#exit
Router#sho -----------------你一定?呵呵这里你只要输入show run 不用管他 只要不输错 就会成功
01:21:25: %SYS-5-CONFIG_I: Configured from console by consolew run
Building configuration...
---------------------------------------------------------
Current configuration : 797 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
logging console notifications
enable password cheng
!
ip subnet-zero
!
!
!
ip inspect audit-trail
ip audit notify log
ip audit po max-events 100
!
!
!
interface FastEthernet0/0 --------------------------------------
ip address 172.16.0.246 255.255.255.0
ip nat inside ------->注意~0~ 这里
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.0.1 255.255.255.0
ip nat outside ------->注意~0~ 这里
duplex auto
speed auto
!
interface Ethernet1/0
no ip address
ip broadcast-address 0.0.0.0
shutdown
half-duplex
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.0.254 ------->注意 这里是缺省路由
ip http server
ip pim bidir-enable
!
!
logging facility local3
logging 172.18.1.3
tacacs-server host 172.18.1.2
!
line con 0
line aux 0
line vty 0 4
login
! -------------------------------------------
end
========================================================
3,配置NAT 转换的重要一句静态路由:
ip route-static {interface number|nexthop}[value][reject|blackhole]

Router# 输入的en和密码就省去了 ~_~
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip nat inside source static 192.168.1.2 172.16.0.246 配置NAT地址的转换信息
Router(config)#exit
Router#show run 查看
01:21:25: %SYS-5-CONFIG_I: Configured from console by console
Building configuration...
---------------------------------------------------------
Current configuration : 797 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
logging console notifications
enable password cheng
!
ip subnet-zero
!
!
!
ip inspect audit-trail
ip audit notify log
ip audit po max-events 100
!
!
!
interface FastEthernet0/0
ip address 172.16.0.246 255.255.255.0
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.0.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface Ethernet1/0
no ip address
ip broadcast-address 0.0.0.0
shutdown
half-duplex
!
ip nat inside source static 192.168.1.2 172.16.0.246 ------------>配好了
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.0.254
ip http server
ip pim bidir-enable
!
logging facility local3
logging 172.18.1.3
tacacs-server host 172.18.1.2
!
line con 0
line aux 0
line vty 0 4
login
!
end
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com