神州数码交换路由配置

hawwiz 添加本地计算机环回接口!!
vlan :

vlan 10
exit
vlan 20
exit

switchport trunk allow vlan 10,20


GVRP:

Switch (config)#gvrp
Switch (config)#vlan 100
Switch (Config-Vlan100)#switchport interface ethernet 1/2-6
Switch (Config-Vlan100)#exit
Switch (config)#interface ethernet 1/11
Switch (Config-If-Ethernet1/11)#switchport mode trunk
Switch (Config-If-Ethernet1/11)#gvrp
Switch (Config-If-Ethernet1/11)#exiT


VLAN 翻译:

switch(Config)#interface ethernet 1/1
switch(Config-Ethernet1/1)#switchport mode trunk
switch(Config-Ethernet1/1)# dot1q-tunnel enable
switch(Config-Ethernet1/1)# vlan-translation enable
switch(Config-Ethernet1/1)# vlan-translation 20 to 3 in 入口翻译为从20 --3
switch(Config-Ethernet1/1)# vlan-translation 3 to 20 out 出口翻译为3--20
switch(Config-Ethernet1/1)# exit
switch(Config)#interface ethernet 1/10
switch(Config-Ethernet1/10)#switchport mode trunk
switch(Config-Ethernet1/10)#exit
switch(Config)#


MAC VLAN:

switchport mac-vlan enable
mac-vlan vlan vlan-id
mac-vlan mac MAC-ADDRESS vlan VLAN-ID priority NO.

subnet-vlan ip-address ADDRESS mask MASK vlan VLAN-ID priority NO.

protocol-vlan mode .....

dynamic-vlan mac-vlan/subnet-vlan perfer

例如: (使的该mac的电脑在接入A,B,C任意一台交换机后都能属于vlan100)

Switch A, Switch B, Switch C:
switch(Config)#mac-vlan mac 00-03-0f-11-22-33 vlan 100 priority 0
switch(Config)#exit

VTP:(vlan中继协议)

VTP模式有3种 服务器模式(Server)客户机模式(Client)透明模式(Transparent)

switchport trunk encaosultion dotlq 设置vlan的中继
vtp domain https://www.360docs.net/doc/3d12456568.html,
vtp password 123
vtp mode server|client|transparent
vtp ver 2
vtp pruning vtp 修剪



STP :

spanning-tree
spanning-tree mode mstp
spanning-tree mst configuration
instance 1 vlan 10,20
instance 2 vlan 30,40
revision-level 1
spanning-tree mst 1 priorty 110 设置交换机在指定实例的网桥优先级。n
spanning-tree mst 2 priorty 100

spanning-tree mst 1 cost COST 设置交换机在指定实例的端口路径代价

spanning-tree hello-time/forward-time/ maxage TIME
spannint-tree max-top NO.
spannint-tree portfast

spanning-tree mst port-priority NO. 设置当前端口在指定实例的端口优先级
SPanning-tree mst priority NO.

spanning-tree tcflush protect
spanning-tree digest-snooping

spanning-tree format standard 设置端口的格式
spanning-tree format privacy

spanning-tree portfast bpdufilter
spanning-tree portfast bpduguard

spanning-tree mst rootguard


VRRP:


RA

router vrrp 1
virtual-ip 192.168.100.1 master
preempt-mode true 配置VRRP 的抢占模式
priority 150
advertisement-interval 3 配置vrrp 定时器时间值为3秒
circuit-failover vlan 2 10 配置vrrp 监控接口为vlan 2, 优先级降低的数额为10
int vlan 100

enable


RB

router vrrp 1
virt

ual-ip 192.168.100.2 backup
preempt-mode ture
priority 110
advertisement-interval 3
circuit-failover valn 1 10
vrrp 1 track int f0/0 10 监视接口f0/0 如果出现故障,优先级降低10
int vlan 100
enable
int vlan 100
ip vrrp authentication mode text 配置从该接口发出的VRRP 报文认证模式为简单字符串模式
ip vrrp authentication string 123


MRPP:


Switch(config)#mrpp enable
Switch(config)#mrpp ring 4000
Switch(mrpp-ring-4000)#control-vlan 4000
Switch(mrpp-ring-4000)# node-mode master
Switch(mrpp-ring-4000)#fail-timer 18
Switch(mrpp-ring-4000)#hello-timer 6
Switch(mrpp-ring-4000)#enable
Switch(mrpp-ring-4000)#exit
Switch(config)#in ethernet 0/0/1
Switch(config-If-Ethernet0/0/1)#mrpp ring 4000 primary-port
Switch(config)#in ethernet 0/0/3
Switch(config-If-Ethernet0/0/3)#mrpp ring 4000 secondary-port



VLAN隔离:

vlan 10
private-vlan primary 能和任意vlan通信

vlan 20
private-vlan community 和关联vlan 以及能和vlan内部能相互通信

vlan 30
private-vlan isolated !内部不能通信,能和关联的vlan通信

VLAN 之间关联:

vlan 10
private-vlan association 20;30 设置vlan关联!
exit

端口隔离:

全局
isolate-port group test 创建隔离组
isolate-port group test switchport int e1/1;e1/2 使e1/1 e1/2相互隔离
isolate-port apply l2|l3|all 隔离2层,3层,全部流量


switch(config)#isolate-port allowed e 0/0/25;26(其余为下行端口)(当某个或某些端口被配置成上行口后,可访问任意口,剩下的端口为下行口,下行口之间不可互访,但可以访问上行口。)


链路捆绑:

int e1/1-10
port-group 1 mode on

exit


port-group load-balan




端口镜像:

monitor session 1 source int f0/0 both
monitor session 1 distination int f0/10

access-list 120 permit tcp 1.2.3.4 0.0.0.255 5.6.7.8 0.0.0.255
monitor session 1 source interface ethernet 0/0/15 access-list 120 rx
配置端口15 的入口绑定规则120


MAC地址捆绑:

int f0/0
switchport port-security maximum Y
switchport port-security mac-address FF-FF-FF-FF-FF-FF

过滤:
mac-address-table blackhole address ff-ff-ff-ff-ff-ff valn 1

mac-address-table static address ff-ff-ff-ff-ff-ff vlan X int fx/y 端口,vlan,mac一起绑定


mac-address-table aging-time 老化时间

使能端口的MAC地址绑定功能,动态学习MAC并转换:

int f0/0
switchport port-security
switchport port-security lock
switchport port-secyrity timeout TIME
switchport port-security convert
switchport port-security mac-address MAC-ADDRESS 静态添加安全MAC
switchport port-security violation protect/shutdown
exit




AM:
an enable (全局)

int fx/x
am port 在端口上使能AM功能!

am ip-pool START-IP-ADDRESS NUM(端口)
am mac-ip -pool MAC-ADDRESS IP ADDERSS (端口)




QOS(交):
MLS qos 全局启动qos
ip a

ccess-list standard 1
permit x.x.x.x 0.0.0.255
exit

class-map class1 match access-group 1 创建一个名为class1的class-map匹配访问控制列表1
exit po

policy-map map1 建立策略表 对相应的分类进行宽带限制,优先级减低等
class class1
police 20000 2000 eclaxceed-action drop 将满足class1 分类规则的报文的带宽设置为20M 比特/秒,突发值设置为2M 字节,超出此带宽的报文一律丢弃
set ip dscp 0setwrr
exit



policy-map map1
class map1 Bandwidth 42 queue-limit 20
class map2 Bandwidth 22 queue-limit 40


int fx/x 配置端口绑定策略。策略只有绑定到具体的端口,才在此端口生效
service-policy input map1
exit


int fx/y 配置 出队 队列工作方式和权重

mls qos trust cos
mls qos cos 4 以dscp 32 来标识生产的数据

一下同理

mls qos trust cos
mls qos cos 6 以 dscp 48 来标识办公数据




mls qos secheduler sp|rr|wrr|drr|wfq 选择输出列队调度方法
drr-queue bandwidth 1 1 1 1 7 1 7 14 配置队列5、7、8的权重,保证生产:办公:视频为1:1:2的关系

wrr-queue bandwidth 8 1 1 0 0 0 0 0 队列1 占80%,队列2 占10%,队列3 占10%,队列4-8 占0%
mls qos map dscp-cos 0 to 0 配置DSCP 值与COS 值得对应关系为DSCP 值为0 的数据包将被置为cos 值为0



创建集合策略并在分类处应用!
mls qos aggregate-policer agg1 20000000 20000 exceed-action drop
Switch(config--Policy-Class)#police aggregate agg1

交换机做DSCP染色:
路由器配置如下
class-map class1 match ip dscp 46
calss-map class2 match ip dscp 34

policy-map map1
class class1
bandwidth 600 dscp 46
class class2
bandwidth 600 dscp 34


路由器做DSCP染色:
路由器配置如下


interface Serial0/2
fair-queue (默认配置)
service-policy DSCP
class-map VideoAudio match access-group VideoAudio
class-map Critical-1 match access-group Critical-1
class-map Critical-2 match access-group Critical-2


ip access-list extended VideoAudio
permit ip 192.168.0.2 255.255.255.255 192.168.1.0 255.255.255.0
ip access-list extended Critical-1
permit ip 192.168.0.3 255.255.255.255 192.168.1.0 255.255.255.0
ip access-list extended Critical-2
permit ip 192.168.0.4 255.255.255.255 192.168.1.0 255.255.255.0


policy-map DSCP
class VideoAudio
Bandwidth 600 dscp 46
class Critical-1
Bandwidth percent 10 dscp 34
class Critical-2
Bandwidth percent 10 dscp 26

QOS(路):


ip access-list ex 1
pemit ip 192.168.1.0 255.255.255.0 192.168.10.0 255.255.255.0
exit
ip access-list ex 2
permit ip 192.168.2.0 255.255.255.0 192.168.20.0 255.255.255.0
exit


priority-list 1 protocol ip hight list 1
priority-list 1 protocol ip low list 2

int f0/0
priority-group 1



PQ:


int fx/x
priority-group LIST-NUMBER


priority-list LIST-NUMBER queue-limit HIGHR-LIMIT/MIDDLE-LIMIT/NOM-L

IMIT/LOW 指定每个对列的上限

priority-list LIST-NUMBER protocol TYPE HIGHT/MIDDLE/NOM/LOW 根据协议的类型来建立排队优先级

priority-list list-number interface interface-type interface-number {high | medium | normal | low}
为进入某个给定接口的数据包建立排队优先级
priority-list list-number default queue-number 无匹配规则的包放入默认队列

例如:

priorit-list 1 queue-limit 15 20 25 30 定义各个对列的长度
priority-list 1 protocol ip hight tcp 23
priorty-list 1 protocol ip hight list 1

priority-list 1 int f0/0 middle 把从f0/0接口进来的数据放入中优先级队列
priority-list 1 protocol ip lnormal 把剩下的数据放入正常队列里


ip access-list standby 1
permit 10.1.1.1 255.255.255.0

ip access-list standby 2
permit 10.1.1.2 255.255.255.0


int fx/y
priority-group 1 在接口应用PQ算法


CQ :

queue-list 1 protocol ip 1 list 1
pueue-list 1 protocol ip 2 list 2

queue-list 1 queue 1 byte-count 14920 limit 30
queue-list 1 queue 2 byte-count 7460 limit 40 配置访问列表1是2宽带的2倍

int f0/y
custom-queue-list 1



CBWFQ:


class-map map1 match access-group 1
class-map map2 match access-group 2

policy-map cbwfq
class map1
bandwith 42 queue-limit 20
限制map1的宽带为42k列队最多为20个
class map2
bandwith 22 queue-limit 40

int fx/y
service-polity cbwfq


int fx/x
rate-limit output access-list 1 8000
rate-limit output access-list 2 8000 流量限制


int e1/1
mls qos trust ip-precedence pass-through-qos 在端口ethernet 1/1,设置信任IP优先级


int f0/1
mls qos trust cos
mls qos cos 4


例:对优先级队列排队算法的选择,选定为按照严格优先级排队。
6108(config)# queue-alg sp



基于流的重定向:

access-list 1 permit host 192.168.1.1
int f0/0
access-group 1 redirect to interface f0/10

说明:
在f0/0端口上 收到来自源地址问哦192.168.1.1的流量,从f0/10转发出去!
基于流的重定向功能,其重定向目的端口必须为千兆口。
ACL中不能配置Timerange和Portrange参数,ACL类型必须为Permit。


dhcp中继:

server dhcp
ip forard-protocol udp bootps
ip helper-address x.x.x.x (vlan 模式下)


ip dhcp relay information enable 本命令用于设置交换机DHCP服务器支持对option82选项的识别


DHCP手工指定(交换机):

Switch(config)#ip dhcp pool A1
Switch(dhcp-A1-config)#host 10.16.1.210
Switch(dhcp-A1-config)#hardware-address 00-03-22-33-dc-ab
Switch(dhcp-A1-config)#client-name management
Switch(dhcp-A1-config)#exit

当dhcp服务器接受到 mac地址和它x-x-x---x-xx 相同时就吧地址给它
Switch(dhcp-1-config)#client-identifier 00-10-5a-60-af-12
Switch(dhcp-1-config)#host 10.1.128.160 24


在交换机的端口启动ARP报文限速功能。

Switch(Config)#

anti-arpscan enable //使能Anti-arpscan

Switch(Config)#anti-arpscan port-based threshold 10 //设置每个端口每秒的ARP报文上限

Switch(Config)#anti-arpscan ip-based threshold 10 //设置每个IP每秒的ARP报文上限

Switch(Config)#anti-arpscan recovery enable //开启防网段扫描自动恢复功能

Switch(Config)#anti-arpscan recovery time 90 //设置自动恢复的时间90秒




策略路由:

ip access-list standard 1
permit x.x.x.x 255.255.255.0
exit
route-map map1 10 permit
match ip address 1
set ip next-top x.x.x.y
exit
int fx/x
ip policy route-map map1
ip local policy route-map map1 打开本地策略路由功能



路由过滤:

filter out:使用filter out 路由器配置命令抑制哪些网络使之不在更新中宣告,no filter out取消这个功能。
filter * out access-list {access-list-name}
filter * out gateway {access-list-name}
filter * out prefix { prefix-list-name}
filter type number out access-list {access-list-name}
filter type number out gateway {access-list-name}
filter type number out prefix {prefix-list-name}
no filter * out
no filter type number out
参数参数说明access-list-name 标准IP访问列表号或名字,这个列表定义了在路由更新中哪些网络被发送,那些网络被抑制。 prefix-list-name标准IP prefix列表名字,这个列表定义了在路由更新中哪些网络被接收,那些网络被抑制。Out 对出站路由更新应用访问列表。 Interface-name (可选的) 某个接口的名字 命令模式



一下方法可以使路由器不向192.168.1.0网段发送路由更新报文

router rip
network 。。。。。
distribute-list 1 out f0/0 调用列表来决定路由的更新方向
ip access-list 1 deny 192.168.1.0 255.255.255.0 禁止此网段通过
permit any


PBR:

ip acc ex a1
per ip ......
exit


mls qos
class-map c1
match access-group a1
exit
policy-map map1
class c1
set ip next-hop x.x.x.x
exit

int f0/0
service-policy input map1


HSRP:(备)
int f0/0
standby priority 200 !配置优先级
standby ip 192.168.1.253 !配置虚拟地址
standby authentication router !配置认证密码

int f0/o
stanndby priority 100
standby ip 192.168.1.254
standby authentication router


IPSEC VPN:

crypto isakmp enable
crypto isakmp policy 110
hash md5
encrypotion 3des
anthencation pre-share
exit
cryto ipsec security-association lifetime seconds 300

crypto ipsec transfrom-set tunnel ah-md5-hamc esp-3des
access-list 101 permit ip 50.50.50.0 255.255.255.0 60.60.60.0 255.255.255.0
exi

crypto map map1 1 ipsec-isakmp
set security-association lifetime {seconds | kilobytes }
match address 101
set transfrom-set tunnel
set peer 20.20.20.20
exit

int f0/0
crypto map map1
exit


VPDN:


vpdn enable
vpdn-group 1

accept-dialin 设置组为nac拨入方式
request-dialin

pr

otocol l2tp
protocol pptp 协议绑定
protocol pppoe

port ppp-port-name 在vpdn组上关联ppp接口

domain DOMAIN-NAME 设置NAC域名





lnitiate-to ip IPADDRESS priority NO. 设置和NAC对通的远端NS的ip地址

lnitiate-to host-name NAME priorty NO. 设置和NAC对通的远端NS的域名

local-name LOCAL-NAME 设置vpdn组本地隧道名

terminate-from REMOTE-NAC-NAME 设置和NS对通的远端NAC的隧道名





force-loacl-chap 设置NS和CLIENT端进行重新认证

lcp-renegotiation 设置NS和CLIENT端进行LCP 重新协商

idle-timeout 设置NAC端链路空闲线超时时间




l2tp tunnel authentication 设置通道认证

l2tp tunnel password 0|7 PASSWORD 设置通道密码

l2tp tunnel hello HELLO-TIME 设置发送hello报文的时间间隔

l2tp tunnel receive-window SIZE 设置隧道接受窗口大小




l2tp hidden 设置L2TP属性隐藏

l2tp sequencing 设置L2TP数据报文请用序列号

L2TP drop out-of-order 设置L2TP丢弃失数据报文



pptp tunnel echo TIME 设置发送ECHO包文时间

pptp flow-control enable 流控

pptp flow-control static-rrt RRT

pptp flow-control receive-window SIZE



PPPOE bind ether-port-name 绑定到以太网接口上

over!!!


L2TP:


client:

username admin password admin
int s0/0
ip add 20.1.1.1 255.255.255.0
no ip directed-broadcaet
encapsulation ppp
ppp chap hostname admin@https://www.360docs.net/doc/3d12456568.html,


lac:


int s0/0
ip add 20.1.1.2 255.255.255.0
no ip direc
encapsulation ppp
ppp chap hostname admin@https://www.360docs.net/doc/3d12456568.html,


vpdn enable
vpdn-group 1
request-dialin 将VPDN组设置成为NAC拨入方式
domain https://www.360docs.net/doc/3d12456568.html,
porocotol l2tp
local-name LAC 隧道名为LAC
initiate-to ip 192.168.20.204 priority 1



lns:

username admin pri 15 password admin
interface virtual-template 1
ip add 20.1.1.3 255.255.255.0
enacpsulition ppp
ppp authen chap
ppp chap hostname admin@https://www.360docs.net/doc/3d12456568.html,


vpdn enable
vpdn-group 1
accept-dialin 将VPDN组设置成为NS拨入方式。
port virtual-template 1
protocol l2tp
terminate-from LAC


PPTP:



PAC端配置如下:

!
username user@https://www.360docs.net/doc/3d12456568.html, password 123
!
interface Virtual-tunnel 1
ip address 20.1.1.1 255.255.255.0
no ip directed-broadcast
ppp chap hostname user@https://www.360docs.net/doc/3d12456568.html,
!
vpdn enable
!
vpdn-group 1
request-dialin - 14
domain https://www.360docs.net/doc/3d12456568.html,
protocol pptp
local-name pac
initiate-to ip 192.168.20.204 priority 1


!
PNS配置如下:

!
username user@https://www.360docs.net/doc/3d12456568.html, password 123
!
inter

face Virtual-template1
ip address 20.1.1.3 255.255.255.0
ppp authentication chap
ppp chap hostname user@https://www.360docs.net/doc/3d12456568.html,
!
vpdn enable
!
vpdn-group 1
accept-dialin
port Virtual-template1
protocol pptp
terninate-from pac
!


PPPOE


Client配置如下:

!
username user@https://www.360docs.net/doc/3d12456568.html, password 123
!
interface Virtual-tunnel1
ip address 20.1.1.1 255.255.255.0
no ip directed-broadcast
ppp chap hostname user@https://www.360docs.net/doc/3d12456568.html,
!
vpdn enable
!
vpdn-group 1
request-dialin
domain https://www.360docs.net/doc/3d12456568.html,
protocol pppoe
pppoe bind FastEthernet0/0
!


Server配置如下:

!
username user@https://www.360docs.net/doc/3d12456568.html, password 123
!
interface Virtual-template1
ip address 20.1.1.3 255.255.255.0
ppp authentication chap
ppp chap hostname user@https://www.360docs.net/doc/3d12456568.html,
!
vpdn enable
!
vpdn-group 1
accept-dialin
port Virtual-template1
protocol pppoe
pppoe bind FastEthernet0/0
!



VPN(GRE):

int tunnel0 !配置TUNNEL 接口
ip add 172.16.1.1 255.255.255. !配置IP 地址
tunnel source s0/0 !设定物理源接口
tunnel destination 192.168.1.2 !设定目的地址(对等)
tunnel key 4 !设定密钥
ip route 192.168.2.0 255.255.255.0 192.168.1.2 !静态路由


BGP:

router bgp 200
neighbor x.x.x.x remote-as 200
neighbor x.x.x.x remote-as 100
neighbor x.x.x.x update-source loopback 0 只接受 loopback0 的更新
bgp log-neighbor-changes
neighbor IPADDRESS weight NO. 给来自邻居的所有路由指定一个权重

DEIGRP:

router deigrp 100
network 192.168.0.0 255.255.255.0
network 192.168.1.0 255.255.255.0

ip beigrp bandwideh-percent PERCENT 配置占总宽带的百分比
no auto-summary

int e1/1
ip beigrp summary-address AS-NO. address mask 配置接口路由汇总

配置路由重发布时,要用 default-metric 命令
不需要重发布静态和直连的路由!!!



ospf明文验证:

router ospf 1
area 0 authen simple
int fx/x
ip ospf password 1234
exit


OSPF:

STUB
area o authentication simple
area 0 authentication message-gigst

area 0 stub {no-summary}
area o default-cost COST 配置末节区域默认的权值

NSSA:

area 0 nssa
area 0 range address mask 设置汇总路由的地址范围 (内部)
summary-address prefix mask 描述覆盖发布路由的地址和掩码(外部)


default-information ORIGNATE .... 强制ASBR生成默认路由进入ospf区域

汇总:

自治系统内:
area 0 range address mask
自治系统间:
summary-address address mask


RIP认证:

int s1/1 !进入与B 相连的接口
ip rip authentication simple
ip rip password digitalchina


配置别动接口:
路由器:
interface f0/0
ip rip passive 配置f0/0只接受报文,不发送报文(rip与ospf配置相同)
交换机:
router rip
passive-interface vlan 10

修改路由管理距离:

router rip
distance 255 配置默认距离为255
distance 9

9 192.168.1.2 0.0.0.0 配置到192.168.1.2 的管理距离为99


EIGRP认证:

key chain test 创建密钥链及密钥
key 1
key-string 123

int f0/0
ip authentication mode eigrp 100 md5 MD5加密
ip authentication key-chain eigrp 100 test


CHAP双向验证:

RA:
username b password 123
aaa authentication ppp default local
int f0/0
encapsulation ppp
ppp authentication chap
ppp chap hostnamt b
ppp chap password 123

RB:
username a password 123
aaa authentication ppp default local
int f0/0
encapsulation ppp
ppp authentication chap
ppp chap hostname a
ppp chap password 123


CHAP单向验证:

RA: SERVER)
aaa authentication ppp test local
user admin password 123
int s0/1
encapsulation ppp
ppp authentication chap test
ip add 192.168.1.1 255.255.255.0
no shu

RB: (client)
aaa authentication ppp de local
int s0/2
enccapsulation ppp
ppp chap hostname admin
ppp chap password 123
ph sp 64000





链路捆绑:

int e1/1-10
port-group 1 mode on

exit



VLAN隔离:

vlan 10
private-vlan primary 能和任意vlan通信

vlan 20
private-vlan community 和关联vlan 以及能和vlan内部能相互通信

vlan 30
private-vlan isolated vlan !内部不能通信,能喝关联的vlan通信

VLAN 之间关联:
vlan 10
private-vlan association 20;30 设置vlan关联!
exit


单向访问控制的实现:

ip access-list extended 101
deny tcp 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255 syn ack (描述:中间一个交换机,左网段是192.168.1.0/24,右网段是192.168.2.0/24!!此做法是左网段能访问右网段,但不能反之!!!)、


WEB/telnet 管理交换机:
telnet-server enable
ip http service
web-user admin password 0 admin
telnet-server securityip x.x.x.x 只有此ip能telnet此交换机!
telnet-user admin password 0 admin



基于mac的ACL: *(二层)

mac access-list extended 1
deny any host ff-ff-ff-ff-ff-ff
int fx/x
mac access-group 1 in (值支持用于入口方向!!)


mdi AUTO|ACROSS|NORMAL 指定连接线的类型

bandwith control BANDWIDTH /RECEIVE/TRANSMIT
packet-suppression PACKET/ BROADCAST|BRMC...打开交换机的包抑制功能

int fx/x
flow control (务必确认两端的速率和双工模式相同)


virtual-cable-test !对连接到以太网端口上的双绞线进行线路检测

firewall enable
firewall default permit
firewall aynamic only|plus normal only 表示分段时间过滤ACL表起作用时,普通ACL不起作用;plus normal 表示分段时间过滤ACL表起作用时,普通ACL也同时起作

acl若指定了绑定,而未指定方向,缺省为out

NAT :

PAT-配置命令:
loghost nat 打开NAT日志功能

int f0/0
ip nat inside
int f0/1
ip nat outside

ip access-list standby 1
permit 192.168.1.0 255.255.255.0

ip nat inside source list 1 int f0/1 在内部本地地址和转换端口

之间建立地址转换规则


动态地址池:

端口和访问控制列表同上:


ip nat outside ip nat pool pool1 10.1.1.1 10.1.1.100 255.255.255.0

ip nat inside source list 1 pool pool1 overload


静态地址映射:

端口和访问控制列表同上:

ip nat inside source static 192.168.1.1 10.1.1.1


端口静态映射:

同上

ip nat inside source static tcp 内部本地地址 内部映射端口 内部全局地址 自定端口


TCP均衡负载:

内网有三台服务器,分别为10.1.1.1/2/3 使用的虚拟ip问10.1.1.27来网代表服务组


配置内外接口ip省略

ip access-list st 1
permit 10.1.1.27

ip nat pool pool1 10.1.1. 10.1.1.3 prefix-length 24 type rotary 表示真实的服务器地址,掩码为24 位,地址集循环使用

ip nat inside destintion list 1 pool pool1 “destintion” 表示对从外部进入的数据包的目的地址进行转换


在接口处配置应用省略

ip nat translation udp/dns/tcp/icmp/syn/finsrt-timeout seconds 缺省为5m、1M、 1H ,1M,1M.1M

ip nat translation max-entries host x.x.x.x NO. 限制该ip能建立的nat最大数目

ip nat translation max-entries host any NO 限制内部所有ip能建立的nat最大数目
端口备份:

int f0/0
backup f0/1 在接口f0/0上设置备份端口为f0/1
backup delay 5 5

备份负载:


backup load enable-threshold disable-threshold 当主接口占用超过实际宽带的百分比时 激活备份端口 , 主接口占用小于实际宽带的百分比时 ,关闭备份端口 !

如:
backup load 60 30



R3642-A(config-if)#ip unnumbered fastEthernet 2
!配置与F2共用一个ip地址


ospf多区域间路由 ospf多区域间路由,外部路由汇总 summary-address,只能ASBR用 ospf多区域间路由,区域间路由汇总 AREA RANGE OSPF



下载:
copy startup-config tftp://192.168.1.2/startup01
上传:
Copy tftp://192.168.1.2/startup01 startup-config


ftp-server enable
ftp-server timeout
ip ftp password
ip ftp username

tftp配置同上



protocol ip rip summary

SSH:

ip domain-name https://www.360docs.net/doc/3d12456568.html,
crypto key generate rsa

aaa new-model
user admin pass admun
ip ssh time-out
ip ssh authentication-retries

或:

aaa new-model
aaa authentication login user local
enable password ruijie
enable service ssh-server
line vty 0 4
transport input ssh
login authentication user



ACL:

全局默认动作只对端口入口方向的数据流量有效。对出口的所有数据包,其默认转发动作均为允许通过(permit)。
?? 只有在包过滤功能打开且端口上没有绑定任何的ACL或不匹配任何绑定的ACL时才会匹配入口的全局的默认动作
?? 当一条access-list被绑定到一个端口的出方向时,其规则(rule)的动作只能为拒绝通过(deny)


设置主机与ip的映射":

ip host


命令:rterminal {en

able | disable}
功能:允许/禁止通过AUX口进行远程配置。

ip local pool
配置一个本地地址池,将IP地址分配给那些连接点到点接口的远端


要在接口上使用某个命名的地址池,使用接口配置命令peer default ip address pool

pppoe配置:

int dialer 1
encapsulation ppp
exit
int f0/0
pppoe-client dialer 1

借用地址:

int f0/0
ip unnumbered s0/1 在f0/0上借用s0/1的ip地址


打开接口的arp代理功能:
int f0/0
ip proxy-arp

DHCP:

hardware-address MAC-ADDRESS
host IP-ADDRESS MASK 将mac和ip绑定

Router(dhcp-config)#next-server 10.1.128.4 文件存放的服务器地址为10.1.128.4
Router(dhcp-config)#option 72 ip 10.1.128.240 配置WWW服务器的地址为10.1.128.240

RIP:

int f0/0
ip rip output 设置接口能过向外发送rip报文
ip split-horiaon 开启水平分割
timer basic
ip rip receive/send version 1|2


OSPF:

default redistribute cost COST 配置引入外部路由时缺省的花销

default redistribute interval TIME 引入的时间间隔
default redistribute limit ROUTER 引入的最多路由条数

Router(Config-Serial2/0)#ip ospf enable area 1 将串口S1/0配置为属于1域

Router(Config-Router-Ospf)#redistribute ospfase rip type 1 tag 3 metric 20 在OSPF路由中引入RIP路由作为第一类外部路由,引入标记值为3,引入代价为20。

AAA:

aaa accounting ppp 开启radius服务器对ppp链路的计费开关
aaa authentication local-first 本地验证优先
aaa authentication ppp default radius

ip tcp header-compression //配置CTCP压缩格式为iphc



reload after TIME 定时重启交换机


同步时间:

sntp enable
sntp server IP

ntp enable
ntp server IP
ntp timezone NAME add NO.
ntp access-group server ACL
ntp authenticate
ntp authenticate-key KEY-ID md5 MD5
ntp trusted-key KEY-ID 配置可信赖密钥


交换机SSH:

ip domain-name https://www.360docs.net/doc/3d12456568.html,
crypto key generate rsa 产生RSA 密钥
aaa new-model
username shenma pass shenma
ip ssh time-out
ip ssh authentication-retries

line vty 0 4
transport input ssh 应用


EIGRP:
ip summary-address eigrp 65001 network mask 手工汇总
variance 差分值
不等价负载均衡:

router eigrp 1
network x.x..x.
variance 2
traffic-share min acrosss-int 数据走开销最小得
traffic-share balanced 开销越大数据越少



帧中继:


frswitch in-port in-dlci out-port out-dlci 配置PVC的静态路由。

frame-relay inverse-arp 激活帧中继的反向ARP。

配置帧中继子接口:

int s0/1
enc frame-relay
int s0/1.10 point-to-point 指定子接口

由于网络接口被配置成多个子接口,必须通过一种方法类区分子接口与物理接口。必须在主接口下配置激活反向ARP,这样

子接口才能使用反向ARP来建立动态地址映射


frame-relay map ipaddress pvc dlci [broadcast] 下一跳IP协议地址与DLCI之间的映射
dlci:为所需要交换逆向ARP 信息的本地接口的DLCI 号

配置从其中一接口收到的数据从另一节口传出:

interface s1/1
encapsulation frame-relay
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay local-dlci 100
!
interface s1/2
encapsulation frame-relay
frame-relay intf-type dce
frame-relay local-dlci 200

frswitch s1/1 100 s1/2 200 在接口1上收到的DLCI 100的帧将从串口2的DLCI 200上转发出去


交换机环路检测功能:

全局:

loopback-detection interval-time 设置环路检测的时间间隔

接口:

loopback-detection specified-vlan VLAN 启动还路检测功能并指定检测的vlan 在TRUNK模式下可检测多个VLAN

loopback-detection control {shutdown|block|learning|trap} 打开和ELNET关闭端口的环路检测受控功能。


只允许特定ip TELNET:

telnet-server seurityip IPADDRESS

线路检测:

int e1/1
virtual-cable-test


ARP欺骗:

ip arp-security updateprotect 启动ARP、ND的自动更新功能

ip arp-security learnprotect 启动ARP、ND的自动学习功能

ip arp-security convert 将所有的动态ARP转换为静态的

专线接口上配置Multilink PPP
!
interface multilink 1
ip address 192.168.20.100 255.0.0.0
encapsulation ppp
ppp lcp enddisc-type local
ppp authentication chap
ppp chap hostname router
ppp multilink
!
interface s1/0
no ip address
encapsulation ppp
ppp lcp enddisc-type local
ppp authentication chap
ppp chap hostname router
ppp multilink
multilink-gourp 1


相关文档
最新文档