! 设置主机名
hostname ASR1
! 配置密码和登录设置
username <your_username> password <your_user_password>
ip domain-name <your_domain_name>
crypto key generate rsa
ip ssh version 2
! 配置接口
interface GigabitEthernet0/0/0
description WAN_Interface
ip address <your_wan_ip_address> <your_wan_subnet_mask>
no shutdown
exit
interface GigabitEthernet0/0/1
description LAN_Interface
ip address <your_lan_ip_address> <your_lan_subnet_mask>
no shutdown
exit
! 配置静态路由
ip route <destination_network> <subnet_mask> <next_hop_ip>
! 配置OSPF协议
router ospf <ospf_process_id>
network <network_address> <wildcard_mask> area <area_id>
! 配置NAT
ip nat inside source list <access-list-number> interface GigabitEthernet0/0/0 overload
! 保存配置
copy running-config startup-config