Skip to content

Commit

Permalink
IP routing
Browse files Browse the repository at this point in the history
IP routing
  • Loading branch information
kroese committed May 11, 2023
2 parents ec3afb7 + 7d45865 commit c2b21d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions run/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ configureDHCP() {

ip address add "${IP}" dev "${VM_NET_VLAN}"
ip link set dev "${VM_NET_VLAN}" up

ip route flush dev "${VM_NET_DEV}"

ip route flush dev "${VM_NET_VLAN}"

ip route del "${NETWORK}" dev "${VM_NET_DEV}"
ip route add "${NETWORK}" dev "${VM_NET_VLAN}" metric 0
ip route add default via "${GATEWAY}"

# Create a macvtap network for the VM guest
{ ip link add link "${VM_NET_DEV}" name "${VM_NET_TAP}" address "${VM_NET_MAC}" type macvtap mode bridge ; rc=$?; } || :
Expand Down

0 comments on commit c2b21d1

Please sign in to comment.