Linux
Routing table 추가하기
포드맨
2025. 6. 3. 01:22
- eth0 : Bridge
- eth1 : NAT
물리 서버에서 eth1 을 추가하는 상황일 때,
$ cd /etc/sysconfig/network-scripts/
$ cp ifcfg-eth0 ifcfg-eth1
$ vi ifcfg-eth1
// 불필요한거 다 지우고(UUID)
// Device, Name 변경
// IP, GW 변경
$ systemctl restart network (Network Manager)
$ nmcli connection down eth1; nmcli connection up eth1 (rhel 7)
$ nmcli con down eth1; nmcli con up eth1 (rhel 8 이상)
$ nmtui

- 대상/접두부(Destination/Prefix) : 라우팅 추가할 대역대
- 다음 홉(Next Hop) : eth1 게이트웨이
$ nmcli con down eth1; nmcli con up eth1
$ route