multi-layer switching(多层交换)

cef思科快速转发

1路由

2高可用性

3安全

4qos

5多播

vlan的acl只有3层交换机支持,2层不支持。

实验:

sw1:

vlan 100

inter range f0/4,f0/6

switchport mode access

switchport access vlan 100

spanning-tree portfast

r4:

int e0/0

ip add 100.1.1.4 255.255.255.0

no sh

r6:

int f0/0

ip add 100.1.1.6 255.255.255.0

no sh

vacl:抓源ip地址或mac

action:fwd,drop

sw1:

access-list 4 permit 100.1.1.4

vlan access-map a

match ip address 4

vlan access-map a

action drop

vlan filter a vlan-list 100 (调用在vlan100)

vlan access-map a

match mac address mac

mac access-list extended mac

permit host 0001.969c.9c90 any

vlan access-map a

action drop

vlan filter a vlan-list 100

clear arp-cache(清理arp表)

配置vacls

switch(config)#vlan access-map map_name[seq#]

switch(config-access-map)#match {ip address {1-199 |1300-2699 | acl_name} | ipx address {800-999 | acl_name} | mac address acl_name}

switch(config-access-map)#action {drop [log]} | {forward [capture]} | {reddirect {type slot/port} | {port-channel channel_id}}

switch(config)#vlan filter map_name vlan_list list

tcam 表

3重 0,1或x

转发方式

集中式

分布式

进程交换

asic交换

netflow

cef

cef两个层面

控制层面和数据层面

控制层面叫fib表,从路由表下载下来,可以被asic芯片调用,解决递归查询,扩展应用(MPLS)。

adj表把arp表下载下来

启用cef

ip cef

show ip cef

show adjacency

交换机无论2层3层都有arp表,3层才可以通过svi做不同vlan通信

vlan间路由:

1.svi

2.l3接口

3.单臂路由

1.r4/r6模拟成pc.配网关

2.sw1将接口划入相应vlan.

3.sw1和sw2 trunking

4.确保sw2有vlan4/6

5.sw2和r3 trunking

6.r3创建子接口

交换端口分析仪(抓包)

sw1:

moinitor session 1 source interface fasternet 0/1

monitror session 1 destination interface f0/2(把f0/1流量引到f0/2)

show monitro session 1

对于不在同一个交换机的抓包开启rvlan

moinitor session 1 source interfa fasternet 0/1

moinitor session 1 destination remote vlan 100(专门用于传输抓包流量的vlan) reflector-port f0/3(空接口)

vlan 100

remote-span(把vlan100定义成rvlan)

sw2:

vlan 100

remote-span

monitor session 1 source remote vlan 100

monitor session 1 destination int f0/2

ntp(网络时间协议)

show clock (查看路由器时间)

使用udp port 123;版本4

实验:

r1:

int s0/0

ip add 12.1.1.1 255.255.255.0

no sh

int s0/1

ip add 13.1.1.1 255.255.255.0

no sh

r2:

int s0/0

ip add 12.1.1.2 255.255.255.0

no sh

r3:

int s0/1

ip add 13.1.1.3 255.255.255.0

no sh

假设吧r2作为时钟源mater

r2:

clock set 21:47:30 25 jul 2007

1.跟主时钟同步。

2.跟次级时钟同步。

net master  1(越小越准确默认8)

show ntp status

r1:

ntp server 12.1.1.2

router rip

v 2

no au

net 12.0.0.0

net 13.0.0.0

r2:

router rip

v2

no au

net 12.0.0.0

r3:

router rip

no au

v2

net 13.0.0.0

ntp server 12.1.1.2

ntp peer 13.1.1.1(跟ntp次级同步)