Skip to content

Commit 7927243

Browse files
authored
Use proper IP addresses in E1 (#187)
1 parent a8a264f commit 7927243

6 files changed

Lines changed: 18 additions & 14 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ RUST_LOG=info cargo test two_workers_base --test two_workers -- --nocapture
6767

6868
You can packet capture during these tests by running the following in parallel.
6969
```
70-
sudo tcpdump -w alsoran.pcap -i lo port 38472 or port 38412 or port 38462
70+
sudo tcpdump -w alsoran.pcap -i lo port 38472 or port 38412 or port 38462 or port 38462
7171
```
7272
...then Ctrl-C at the end of the test and open alsoran.pcap in Wireshark.
7373

documentation/backlog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- e.g. "Inital access procedure failed - Connection refused (os error 111)" at debug
1414
- two worker enablement (share DU configuration between workers - see [documentation/design/State - DU.md])
1515
- use NonEmpty instead of Vec in ASN.1 autogen if lower bound is 1
16+
- provide TransportAddress constructor from string (and use common struct for all XXAP libraries)
1617

1718
## SCALE OUT / MULTIPLE TNLA
1819
- Allow AMF to specify 2nd endpoint - ask worker 1
@@ -77,6 +78,7 @@
7778
- Distributed timers and failure path cleanup mechanism
7879

7980
# DONE
81+
- Use proper 32 bit bitstrings for TransportAddress in E1AP messages (avoids Wireshark decode issue)
8082
- Support for BearerContextModificationRequest in CU-UP
8183
- Pass CellGroupConfig from DU to UE in Rrc Reconfiguration Request
8284
- Use proper NAS messages from AMF-SIM to improve Wireshark trace of ODU interop

documentation/howto/odu.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sudo ip addr add 192.168.130.81/32 dev eth0 label eth0:ODU
1111
sudo ip addr add 192.168.130.82/32 dev eth0 label eth0:CU_STUB
1212

1313
# optional set up tcpdump
14-
sudo tcpdump -w alsoran.pcap -i lo port 38472 or port 38412
14+
sudo tcpdump -w alsoran.pcap -i lo port 38472 or port 38412 or port 38462
1515

1616
# in terminal 1, projects/alsoran/gnb-cu-cp
1717
cargo run -- --local-ip=192.168.130.82
@@ -60,14 +60,14 @@ cargo run
6060

6161
# In terminal 2, projects/alsoran/gnb-cu-cp
6262
redis-server &
63-
cargo run -- --local-ip=127.0.0.1
63+
RUST_LOG=debug cargo run -- --local-ip=127.0.0.1
6464

6565
# In terminal 3, projects/alsoran/gnb-cu-up
66-
cargo run
66+
RUST_LOG=debug cargo run
6767

6868
# in terminal 4,
6969
```
70-
sudo tcpdump -w alsoran.pcap -i lo port 38472 or port 38412
70+
sudo tcpdump -w alsoran.pcap -i lo port 38472 or port 38412 or port 38462
7171
```
7272

7373
# in terminal 5, in o-du-l2 directory

gnb-cu-cp/src/workflows/pdu_session_resource_setup.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use super::{GnbCuCp, Workflow};
44
use crate::datastore::UeState;
55
use anyhow::Result;
6-
use bitvec::prelude::*;
76
use e1ap::*;
87
use f1ap::UeContextSetupProcedure;
98
use net::SerDes;
@@ -225,10 +224,13 @@ impl<'a, G: GnbCuCp> Workflow<'a, G> {
225224
maximum_i_pdatarate: None,
226225
},
227226
pdu_session_resource_dl_ambr: None,
227+
// TODO: get transport information from the request
228228
// TODO: Frunk transmogrify would be ideal
229229
ng_ul_up_tnl_information: UpTnlInformation::GtpTunnel(GtpTunnel {
230-
transport_layer_address: TransportLayerAddress(bitvec![u8,Msb0;0,1,1,0]),
231-
gtp_teid: GtpTeid(vec![1, 2, 3, 4]),
230+
transport_layer_address: TransportLayerAddress(net::ip_bits_from_string(
231+
"192.168.110.82",
232+
)?),
233+
gtp_teid: GtpTeid(vec![0, 0, 0, 1]),
232234
}),
233235
pdu_session_data_forwarding_information_request: None,
234236
pdu_session_inactivity_timer: None,
@@ -237,7 +239,7 @@ impl<'a, G: GnbCuCp> Workflow<'a, G> {
237239
drb_to_setup_list_ng_ran: DrbToSetupListNgRan(vec![DrbToSetupItemNgRan {
238240
drb_id: DrbId(1),
239241
sdap_configuration: SdapConfiguration {
240-
default_drb: DefaultDrb::True,
242+
default_drb: DefaultDrb::True, // test
241243
sdap_header_ul: SdapHeaderUl::Present,
242244
sdap_header_dl: SdapHeaderDl::Present,
243245
},

gnb-cu-up/src/workflows/bearer_context_setup.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
use super::{GnbCuUp, Workflow};
55
use anyhow::Result;
6-
use bitvec::prelude::*;
76
use e1ap::*;
87
use net::{RequestError, ResponseAction};
98

@@ -17,8 +16,8 @@ impl<'a, G: GnbCuUp> Workflow<'a, G> {
1716

1817
// The userplane processing doesn't exist yet, but let's suppose it will be designed to
1918
// use the same GTP TEID on both sides for each bearer.
20-
let my_uplink_address = TransportLayerAddress(bitvec![u8,Msb0;3,3,3,3]);
21-
let my_downlink_address = TransportLayerAddress(bitvec![u8,Msb0;4,4,4,4]);
19+
let my_uplink_address = TransportLayerAddress(net::ip_bits_from_string("3.3.3.3")?);
20+
let my_downlink_address = TransportLayerAddress(net::ip_bits_from_string("4.4.4.4")?);
2221
let bearer_1_gtp_teid = GtpTeid(vec![1, 2, 3, 4]);
2322

2423
self.log_message("BearerContextSetupResponse >>");

net/src/ip_bits_from_string.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
use async_net::{AddrParseError, IpAddr};
1+
use anyhow::Result;
2+
use async_net::IpAddr;
23
use bitvec::prelude::*;
34

4-
pub fn ip_bits_from_string(addr: &str) -> Result<BitVec<u8, Msb0>, AddrParseError> {
5+
pub fn ip_bits_from_string(addr: &str) -> Result<BitVec<u8, Msb0>> {
56
Ok(match addr.parse()? {
67
IpAddr::V4(x) => BitVec::<_, Msb0>::from_slice(&x.octets()),
78
IpAddr::V6(x) => BitVec::<_, Msb0>::from_slice(&x.octets()),

0 commit comments

Comments
 (0)