Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add loopback veth code #77

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sar772004
Copy link
Contributor

@kingshukdev @manomugdha @networkop
Please review, this one is not tested in my lab yet..

@sar772004
Copy link
Contributor Author

sar772004 commented May 3, 2023

@networkop i have updated the 2node.yaml, but not sure if we have any validity checking for links existing on the pod or not
can you check or comment?

log.Infof("MY VETH STRUCT: %+v", spew.Sdump(myVeth))
log.Infof("PEER STRUCT: %+v", spew.Sdump(peerVeth))
return err
}
Copy link
Contributor

@kingshukdev kingshukdev May 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a "continue" statement after successful. veth creation ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed this too

tests/2node.yml Outdated
@@ -14,6 +14,10 @@ items:
local_ip: 12.12.12.1/24
peer_intf: eth1
peer_ip: 12.12.12.2/24
- uid: 2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think uid:2 is already used, try making it 3 to avoid confusion.
As for the testing, try giving both ends of the link an IP address. I'm assuming ping -I <sourceIntf> <destIP> should force the traffic down the veth pair. Might be worth checking with tcpdump.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed the uid, though the veth is created fine, having same subnet on two interfaces would not work properly without moving the interfaces into separate netns.

143: eth3@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether ba:7e:81:44:27:86 brd ff:ff:ff:ff:ff:ff
inet 13.13.13.2/24 brd 13.13.13.255 scope global eth3
valid_lft forever preferred_lft forever
144: eth2@eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 52:fd:54:06:4e:50 brd ff:ff:ff:ff:ff:ff
inet 13.13.13.1/24 brd 13.13.13.255 scope global eth2
valid_lft forever preferred_lft forever

@networkop
Copy link
Owner

reminder to self to test and merge this @networkop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants