Most used commands
- Saving Configuration
copy running-config startup-config
- Configuring a Loopback Interface
!
configure terminal
interface loopback 0
ip address 1.1.1.1 255.255.255.255 (static IP address)
ip nat outside
!
- Configuring a Gigabit Ethernet Interface
!
configure terminal
interface gigabitEthernet 0/0
ip address 10.10.10.1 255.255.255.252
no shutdown
!
NOTE! Without command no shutdown
the interface would not be up.
- Configuring a Fast Ethernet Interface
!
configure terminal
interface fastEthernet 0/0
ip address 10.10.10.1 255.255.255.252
no shutdown
!
NOTE! Without command no shutdown
the interface would not be up.
- Configuring an OSPF Protocol
!
configure terminal
router ospf 1
network 10.10.10.0 0.0.0.255 area 0
!
- Configuring a BGP Protocol
!
configure terminal
router bgp ${as-id}
network 10.10.10.0 mask 255.255.255.0
neighbor 10.10.10.1 remote-as ${as-id}
!
NOTE! Without keyword mask
the protocol redistribution might have problem if two or more network exist.
- Redistribution of OSPF Internal and External Routes into BGP
!
configure terminal
router bgp ${as-id}
redistribute ospf 1 match internal external 1 external 2
!
NOTE! Keywords internal
external 1
external 2
mean to redistribute all ospf routes.
- Redistribution of BGP Routes into OSPF
!
configure terminal
router ospf 1
redistribute bgp ${as-id} metric 100 subnets
!
NOTE! Keywords metric 100 subnets are necessary here.
竟然无法拒绝你的打赏
