我有以下 Red 语言 - 如何将其转换为 Ubuntu 语法?相关文件是什么?
我/etc/sysconfig/network
有
NETWORKING=yes
HOSTNAME=onyx.boisestate.edu
GATEWAY=132.178.208.1
我/etc/sysconfig/network-scripts/ifcfg-eth1
有
DEVICE=eth1
BOOTPROTO=none
BROADCAST=132.178.223.255
IPADDR=132.178.208.159
NETMASK=255.255.240.0
NETWORK=132.178.208.0
ONBOOT=yes
USERCTL=no
PEERDNS=no
GATEWAY=132.178.208.1
TYPE=Ethernet
我/etc/sysconfig/network-scripts/ifcfg-eth0
有
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.0.255
IPADDR=192.168.0.1
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
USERCTL=no
PEERDNS=no
TYPE=Ethernet
答案1
主机名在文件/etc/sysconfig/network
中设置/etc/hosts
127.0.0.1 onyx.boisestate.edu onyx
您可以将其添加为:
132.178.208.159 onyx.boisestate.edu onyx
以太网接口/etc/sysconfig/network-scripts/ifcfg-ethX
在文件中设置/etc/network/interfaces
如下:
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
auto eth1
iface eth1 inet static
address 132.178.223.159
netmask 255.255.240.0
network 132.178.208.0
broadcast 132.178.223.255
gateway 132.178.208.1
希望这可以帮助!