锐捷2014E多vlan上与不上internet

Ruijie2014E#show run

Building configuration...
Current configuration : 3602 bytes

!
version RGOS 10.4(3b34)p5 Release(224254)(Mon Nov 19 20:16:03 CST 2018 -ngcf65)
hostname Ruijie2014E
webmaster level 0 username admin password 7 111323081b44(admin)-------默认
!
!
!
!
diffserv domain default
!
!
!
!
no cwmp
!
!
!
vlan 1-------默认
!
vlan 100---下三vlan新建
!
vlan 101
!
vlan 102
!
!
no service password-encryption
service dhcp-----启用dhcp服务
!
ip dhcp excluded-address 192.168.100.1 192.168.100.100---关联地址池中不分的ip
ip dhcp excluded-address 192.168.101.1 192.168.101.100
ip dhcp excluded-address 192.168.102.1 192.168.102.100
!
!
ip dhcp pool vlan100---三个vlan的dhcp池
network 192.168.100.0 255.255.255.0
dns-server 202.99.166.4 222.222.222.222
default-router 192.168.100.254
!
ip dhcp pool vlan101
network 192.168.101.0 255.255.255.0
dns-server 202.99.166.4 222.222.222.222
default-router 192.168.101.254
!
ip dhcp pool vlan102
network 192.168.102.0 255.255.255.0
dns-server 202.99.166.4 222.222.222.222
default-router 192.168.102.254
!
!
!
!
ip access-list standard 1--------这里控制vlan100/102能nat上网,vlan101只能内网互访,不能nat出去
10 permit 192.168.100.0 0.0.0.255
20 permit 192.168.102.0 0.0.0.255
!
!
!
!
!
control-plane
!
control-plane protocol
no acpp
!
control-plane manage
no port-filter
no arp-car
no acpp
!
control-plane data
no glean-car
no acpp
!
!
!
!
enable password 5922900-----特权模式密码
enable service web-server http-----------默认
enable service web-server https
!
!
!
!
!
interface FastEthernet 1/0-------交换端口分属不同的vlan
switchport access vlan 100------switchport mode access执行了不显示说明默认就是access端口
!
interface FastEthernet 1/1
switchport access vlan 100
!
interface FastEthernet 1/2
switchport access vlan 100
!
interface FastEthernet 1/3
switchport access vlan 100
!
interface FastEthernet 1/4
switchport access vlan 100
!
interface FastEthernet 1/5
switchport access vlan 100
!
interface FastEthernet 1/6
switchport access vlan 100
!
interface FastEthernet 1/7
switchport access vlan 100
!
interface FastEthernet 1/8
switchport access vlan 100
!
interface FastEthernet 1/9
switchport access vlan 100
!
interface FastEthernet 1/10
switchport access vlan 100
!
interface FastEthernet 1/11
switchport access vlan 100
!
interface FastEthernet 1/12
switchport access vlan 101
!
interface FastEthernet 1/13
switchport access vlan 101
!
interface FastEthernet 1/14
switchport access vlan 101
!
interface FastEthernet 1/15
switchport access vlan 101
!
interface FastEthernet 1/16
switchport access vlan 101
!
interface FastEthernet 1/17
switchport access vlan 101
!
interface FastEthernet 1/18
switchport access vlan 101
!
interface FastEthernet 1/19
switchport access vlan 101
!
interface FastEthernet 1/20
switchport access vlan 101
!
interface FastEthernet 1/21
switchport access vlan 101
!
interface FastEthernet 1/22
switchport access vlan 102
!
interface FastEthernet 1/23
switchport access vlan 102
!
interface GigabitEthernet 0/0-------默认
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet 0/1------配ip,outside定义此端口为wan接口
ip nat outside
ip address 172.16.11.11 255.255.255.0
duplex auto
speed auto
!
interface VLAN 100---定义为内网端口(逻辑)
ip nat inside
ip address 192.168.100.254 255.255.255.0
!
interface VLAN 101---定义为内网端口(逻辑)
ip nat inside
ip address 192.168.101.254 255.255.255.0
!
interface VLAN 102---定义为内网端口(逻辑)
ip nat inside
ip address 192.168.102.254 255.255.255.0
!
ip nat inside source list 1 interface GigabitEthernet 0/1---关联acl(内网需要nat的ip)与wan接口
!
!
!
ip route 0.0.0.0 0.0.0.0 172.16.11.254-------网关/缺省路由/默认路由都一个意思
!
!
!
!
!
ref parameter 75 140
line con 0
line aux 0
line vty 0 4------telnet只密码登录
login
password 5922900
!
!
end
Ruijie2014E#
Ruijie2014E#

posted @ 2024-12-13 11:23  techNote  阅读(9)  评论(0编辑  收藏  举报