edit file: /etc/network/interfaces

the original content should be something like:

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.0.1 

add the following settings in the file:

auto eth0:1
iface eth0:1 inet static
address 192.168.0.6
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

# dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.0.1

 

run command in root mode:

/etc/init.d/networking restart

that's all. you can run ifconfig to check if it works.

I tested it in ubuntu 6.10.

相关文章:

  • 2022-01-04
  • 2021-11-07
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-12-29
  • 2021-11-25
  • 2021-06-05
  • 2022-02-17
相关资源
相似解决方案