Skip to content

Instantly share code, notes, and snippets.

@lifeblood
Last active March 29, 2024 05:30
Show Gist options
  • Save lifeblood/ca1f590ba256b214eef1fbc89c68cba1 to your computer and use it in GitHub Desktop.
Save lifeblood/ca1f590ba256b214eef1fbc89c68cba1 to your computer and use it in GitHub Desktop.
Linux网卡配置

添加网站

ip addr add 192.168.0.77/24 dev eth0 
cat /etc/systemconfig/network-scripts/ifcfg-eht0


BOOTPROTO=static

IPADDR=172.18.14.223
PREFIX=24
GATEWAY=172.18.14.1
DNS1=8.8.8.8

debian配置路由 vim /etc/network/interfaces

auto eth0
iface eth0 inet static
    address 192.168.0.8
    netmask 255.255.255.0
    gateway 192.168.0.1
    up ip route add 192.168.1.0/22 via 192.168.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment