以下的範例適用於CISCO 1 Wan / 1Lan 等級以上的router

 

hostname #公司代號#

username #帳號# password #中華電信指定密碼#

!

!設定VoIP group

class-map match-any voip

 match access-group 150

class-map match-any erp

 match access-group 151

!QoS的細項設訂

policy-map QOS

 class voip

  set ip precedence 4

  bandwidth 128  ; 設定VoIP的保障頻寬

 class erp

  set ip precedence 2

  bandwidth 128 ; ERP的保障頻寬

 class class-default

  queue-limit 1024 packets

  fair-queue

policy-map QOS-FE

 class class-default

  shape average 1000000 ; 設定對外的總頻寬

  queue-limit 1024 packets

  service-policy QOS

!

!設定WAN IP

interface FastEthernet0/0

 ip address 172.21.98.26 255.255.255.252

 ip flow ingress

 ip flow egress

 duplex auto

 speed auto

 service-policy output QOS-FE

!

!設定LAN IP

interface FastEthernet0/1

 ip address 192.168.1.254 255.255.255.0

 duplex auto

 speed auto

!設定BGP

router bgp 65026

 bgp log-neighbor-changes

 network 192.168.1.0 mask 255.255.255.0

 neighbor 172.21.98.25 remote-as 9505

!

!設定中華電信端的net-flow server

ip flow-export version 5 origin-as

ip flow-export destination 1.1.1.1 1234

!

!設定備援路由

ip route 0.0.0.0 0.0.0.0 172.21.98.25

ip route 10.0.0.0 255.0.0.0 FastEthernet0/1 192.168.1.252 200

ip route 172.16.0.0 255.240.0.0 FastEthernet0/1 192.168.1.252 200

ip route 192.168.0.0 255.255.0.0 FastEthernet0/1 192.168.1.252 200

!

!設定VoIPERPIP Address

access-list 150 remark voip

access-list 150 permit ip host 192.168.1.251 any

access-list 151 remark erp

access-list 151 permit ip host 172.20.1.1 any

access-list 151 permit ip host 172.20.1.2 any

!

!設定SNMP community

snmp-server community test RO

snmp-server community testRW RW

!

!設定login時需要指定用帳號密碼才能登入

line vty 0 4

 login local

 transport input all