Debian Cobbler在多网卡环境下的应用实践
一、典型场景与网络拓扑
二、Cobbler服务器端的多网卡配置要点
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto eth0.10
iface eth0.10 inet static
address 192.168.10.2/24
gateway 192.168.10.1
vlan-raw-device eth0
auto eth0.20
iface eth0.20 inet static
address 192.168.20.2/24
# 该VLAN若无需默认网关,可不设置gateway
vlan-raw-device eth0
完成后执行 systemctl restart networking && cobbler sync 使配置生效。三、客户端多网卡装机与Kickstart配置
cobbler system add \
--name=node01 \
--profile=debian12-x86_64 \
--mac=00:11:22:33:44:55 \
--ip-address=192.168.10.10 \
--subnet=255.255.255.0 \
--gateway=192.168.10.1 \
--hostname=node01.example.com \
--interface=eth0 \
--static=1 \
--name-servers="192.168.10.2 8.8.8.8" \
--netboot-enabled=true
cobbler system edit \
--name=node01 \
--ip-address=10.2.2.10 \
--subnet=255.255.255.0 \
--interface=eth1 \
--static=1
cobbler system edit \
--name=node01 \
--interface=eth1 \
--static-routes="192.168.99.0/24:192.168.50.162"
netplan apply(若使用 netplan)或重启网络服务。四、安全与运维注意事项