注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 QoS流量的分类和标记
 帮助

单臂路由实验


2007-08-22 22:14:33
 标签:单臂路由   [推送到技术圈]



version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable password ciso
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
!
no ftp-server write-enable
voice-card 0
 no dspfarm
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
 no ip address
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/0.1
 encapsulation dot1Q 2
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
!
interface GigabitEthernet0/0.2
 encapsulation dot1Q 3
 ip address 192.168.2.1 255.255.255.0
 ip nat inside
!
interface GigabitEthernet0/0.3
 encapsulation dot1Q 1 native
 ip address 192.168.3.1 255.255.255.0
 ip nat inside
!
interface GigabitEthernet0/1
 ip address 10.225.196.100 255.255.240.0
 ip nat outside
 duplex auto
 speed auto
 media-type rj45
!
interface Serial0/0/0
 no ip address
 shutdown
 clockrate 2000000
!
interface Serial0/0/1
 no ip address
 shutdown
 clockrate 2000000
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.225.200.10
!
!
no ip http server
no ip http secure-server
ip nat pool ip 10.225.196.101 10.225.196.120 netmask 255.255.255.0
ip nat inside source list 1 pool ip overload
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
!
!
control-plane
!
!
!
!
!
!
!
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 password cisco
 login
!
scheduler allocate 20000 1000
!
end




    文章评论
 
2007-08-23 03:13:58
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
media-type rj45 // 物理类型为RJ-45
!
interface GigabitEthernet0/0.1 //子接口
encapsulation dot1Q 2   // 封装 VLAN2
ip address 192.168.1.1 255.255.255.0 //IP
ip nat inside // NAT 地址转换 inside
!
interface GigabitEthernet0/0.2 //子接口
encapsulation dot1Q 3 // 封装VLAN 3
ip address 192.168.2.1 255.255.255.0 //IP
ip nat inside // NAT 地址转换 inside
!
interface GigabitEthernet0/0.3 //子接口
encapsulation dot1Q 1 native // 封装VLAN 1 本地VLAN
ip address 192.168.3.1 255.255.255.0 //IP
ip nat inside // NAT 地址转换 inside
!
interface GigabitEthernet0/1
ip address 10.225.196.100 255.255.240.0 //IP
ip nat outside // NAT outside
duplex auto //全双工自动
speed auto // 速度自动
media-type rj45 // 类型 RJ-45
!
interface Serial0/0/0 // shutdown
no ip address
shutdown
clockrate 2000000
!
interface Serial0/0/1 //shutdown
no ip address
shutdown
clockrate 2000000
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.225.200.10 // 默认路由 下 跳                         10.225.200.10
!
!
no ip http server                 // 无HTTP管理
no ip http secure-server       //无HTTPS管理
ip nat pool ip 10.225.196.101 10.225.196.120 netmask 255.255.255.0
// 动态地址转换 10.225.196.101 10.225.196.120
ip nat inside source list 1 pool ip overload
! // 动态NAT命令
access-list 1 permit 192.168.1.0 0.0.0.255 // 只允许192.168.1.0 段出去?!!

2007-08-23 22:20:32
留下来啦

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: