当初始化路由器时,通过使用/setup指令设置下列配置内容:
重新设置路由器配置
载入接口驱动
配置IP地址和网关
设置DHCP客户端
设置DHCP服务端
设置pppoe客户端
设置pptp客户端
使用Setup指令,在路由器上配置IP地址。
执行/setup指令行:
[admin@MikroTik] > setup
Setup uses Safe Mode. It means that all changes that are made during setup
are reverted in case of error, or if Ctrl-C is used to abort setup. To keep
changes exit setup using the 'x' key.
[Safe Mode taken]
Choose options by pressing one of the letters in the left column, before
dash. Pressing 'x' will exit current menu, pressing Enter key will select the
entry that is marked by an '*'. You can abort setup at any time by pressing
Ctrl-C.
Entries marked by '+' are already configured.
Entries marked by '-' cannot be used yet.
Entries marked by 'X' cannot be used without installing additional packages.
r - reset all router configuration
+ l - load interface driver
* a - configure ip address and gateway
d - setup dhcp client
s - setup dhcp server
p - setup pppoe client
t - setup pptp client
x - exit menu
your choice [press Enter to configure ip address and gateway]: a 配置IP地址和网关,输入a或[Enter]
* a - add ip address
- g - setup default gateway
x - exit menu
your choice [press Enter to add ip address]: a 选择a添加一个IP地址,首先,设置程序将要询问你选择那一个接口添加IP地址,如果设置程序没有指定出,合适的接口,可以通过键入[Tab]两次,查看可选的接口。在接口选择后,分配IP地址和子网淹码:
your choice: a
enable interface:
ether1 ether2 wlan1
enable interface: ether1
ip address/netmask: 10.1.0.66/24
#Enabling interface
/interface enable ether1
#Adding IP address
/ip address add address=10.1.0.66/24 interface=ether1 comment="added by setup"
+ a - add ip address
* g - setup default gateway
x - exit menu
your choice: x