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

GRE: add encapsulation gre and gretap #2

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

sever-sever
Copy link
Member

@sever-sever sever-sever commented Jan 22, 2025

Change Summary

GRE: Add tunnel-type erspan, l3 and teb

Add tunnel type
 - erspan
 - l3
 - teb (Transparent Ethernet Bridge)

By default L3 GRE interfaces cannot be bridged to a bridge interface.
Add the ability to change tunnel type.
set vpp interfaces gre gre2 tunnel-type 'teb

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Other (please describe):

Related Task(s)

Related PR(s)

Proposed changes

How to test

Add two GRE tunnels, with gre and gretap encapsulation

set vpp settings interface eth1 driver 'dpdk'

set vpp interfaces gre gre2 remote '192.0.2.2'
set vpp interfaces gre gre2 source-address '192.0.2.1'
set vpp interfaces gre gre2 tunnel-type 'teb'
set vpp interfaces gre gre3 remote '203.0.113.3'
set vpp interfaces gre gre3 source-address '192.0.2.1'
set vpp interfaces gre gre4 remote '192.0.2.42'
set vpp interfaces gre gre4 source-address '192.0.2.1'
set vpp interfaces gre gre4 tunnel-type 'erspan'

set vpp interfaces bridge br1 member interface 'eth1'
set vpp interfaces bridge br1 member interface 'gre2'

set vpp settings logging default-log-level 'debug'
set vpp settings unix poll-sleep-usec '10'

Instance 2 (l2), instance 3 (l3)

vyos@r14# sudo vppctl show gre tunnel
[0] instance 2 src 192.0.2.1 dst 192.0.2.2 fib-idx 0 sw-if-idx 3 payload TEB point-to-point l2-adj-idx 3 
[1] instance 3 src 192.0.2.1 dst 203.0.113.3 fib-idx 0 sw-if-idx 4 payload L3 point-to-point 
[2] instance 4 src 192.0.2.1 dst 192.0.2.42 fib-idx 0 sw-if-idx 5 payload ERSPAN point-to-point session 0 l2-adj-idx 4 
[edit]
vyos@r14# 

Check bridge-domain:

vyos@r14# sudo vppctl show bridge-domain 1 detail
  BD-ID   Index   BSN  Age(min)  Learning  U-Forwrd   UU-Flood   Flooding  ARP-Term  arp-ufwd Learn-co Learn-li   BVI-Intf 
    1       1      0     off        on        on       flood        on       off       off        1    16777216     N/A    
span-l2-input l2-input-classify l2-input-feat-arc l2-policer-classify l2-input-acl vpath-input-l2 l2-ip-qos-record l2-input-vtr l2-learn l2-rw l2-fwd l2-flood l2-flood l2-output 

           Interface           If-idx ISN  SHG  BVI  TxFlood        VLAN-Tag-Rewrite       
             eth1                1     1    0    -      *                 none             
             gre2                4     1    0    -      *                 none             
[edit]
vyos@r14# 

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@sever-sever sever-sever requested review from dmbaturin and zdc January 22, 2025 15:10
@sever-sever sever-sever changed the title GRE: add encapsilatio gre and gretap GRE: add encapsulation gre and gretap Jan 22, 2025
@sever-sever sever-sever force-pushed the sever-sever-gre branch 2 times, most recently from 60602fd to f8e62c2 Compare January 22, 2025 15:17
@sever-sever sever-sever marked this pull request as draft January 22, 2025 19:19
Add tunnel type
 - erspan
 - l3
 - teb (Transparent Ethernet Bridge)

By default L3 GRE interfaces cannot be bridged to a bridge interface.
Add the ability to change tunnel type.

set vpp interfaces gre gre2 tunnel-type 'teb'
@sever-sever sever-sever marked this pull request as ready for review January 24, 2025 10:01
@sever-sever sever-sever merged commit 912128a into current Jan 24, 2025
2 checks passed
@sever-sever sever-sever deleted the sever-sever-gre branch January 24, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant