def test_parser_mtr_interactive_3(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/mtr_interactive_3.txt", tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.1.254',
                    loss=0.0,
                    avg_rtt=4.1,
                    min_rtt=2.5,
                    max_rtt=8.9)
        ],
        2: [
            HopHost(host='10.1.131.181',
                    loss=0.0,
                    avg_rtt=14.9,
                    min_rtt=8.3,
                    max_rtt=38.9)
        ],
        3: [
            HopHost(host='10.250.139.186',
                    loss=0.0,
                    avg_rtt=10.0,
                    min_rtt=9.4,
                    max_rtt=10.8)
        ],
        4: [
            HopHost(host='10.254.0.217',
                    loss=0.0,
                    avg_rtt=10.0,
                    min_rtt=9.6,
                    max_rtt=10.3)
        ],
        5: [],
    }
Esempio n. 2
0
def test_parser_linux_5(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/linux_5.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='local_host_name', loss=None, avg_rtt=1.196, min_rtt=0.885, max_rtt=1.423)],
        2: [HopHost(host='2001:db8:100::1:1a', loss=None, avg_rtt=0.287, min_rtt=0.237, max_rtt=0.386)],
        3: [HopHost(host='another_local_host_name', loss=None, avg_rtt=67.957, min_rtt=39.849, max_rtt=116.046)],
        4: [HopHost(host='2001:db8:1:2:2:4680:0:1', loss=None, avg_rtt=21.443, min_rtt=21.443, max_rtt=21.443),
            HopHost(host='2001:db8:1:2:2:42e5:0:1', loss=None, avg_rtt=21.297, min_rtt=21.287, max_rtt=21.306)],
        5: [],
    }
Esempio n. 3
0
def test_parser_linux_2(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/linux_2.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='72.14.232.198', loss=None, avg_rtt=19.603, min_rtt=19.596, max_rtt=19.608)],
        2: [HopHost(host='94.198.103.149', loss=None, avg_rtt=19.542, min_rtt=19.535, max_rtt=19.555)],
        3: [],
        4: [],
        5: [HopHost(host='94.198.103.142', loss=None, avg_rtt=19.443, min_rtt=19.428, max_rtt=19.454)],
        6: [HopHost(host='217.29.72.146', loss=None, avg_rtt=13.627, min_rtt=10.738, max_rtt=19.344)],
        7: [],
        8: [],
    }
def test_parser_mtr_interactive_4(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/mtr_interactive_4.txt", tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.0.2.1',
                    loss=0.0,
                    avg_rtt=15.2,
                    min_rtt=0.4,
                    max_rtt=208.0)
        ],
        2: [],
        3: [],
        4: [],
        5: [],
        6: [],
        7: [
            HopHost(host='10.111.8.129',
                    loss=0.0,
                    avg_rtt=1.1,
                    min_rtt=0.1,
                    max_rtt=45.3),
            HopHost(host='10.111.10.1',
                    loss=0.0,
                    avg_rtt=1.1,
                    min_rtt=0.1,
                    max_rtt=45.3),
            HopHost(host='host.example.com',
                    loss=0.0,
                    avg_rtt=1.1,
                    min_rtt=0.1,
                    max_rtt=45.3)
        ],
        8: [
            HopHost(host='192.22.8.129',
                    loss=0.0,
                    avg_rtt=1.2,
                    min_rtt=0.2,
                    max_rtt=45.4),
            HopHost(host='192.22.10.1',
                    loss=0.0,
                    avg_rtt=1.2,
                    min_rtt=0.2,
                    max_rtt=45.4),
            HopHost(host='host2.example.com',
                    loss=0.0,
                    avg_rtt=1.2,
                    min_rtt=0.2,
                    max_rtt=45.4)
        ],
        9: [
            HopHost(host='192.0.2.2',
                    loss=13.7,
                    avg_rtt=22.5,
                    min_rtt=22.5,
                    max_rtt=33.6)
        ],
    }
Esempio n. 5
0
def test_parser_mtr_1(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/mtr_1.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='192.168.1.254', loss=0.0, avg_rtt=6.4, min_rtt=3.8, max_rtt=9.1)],
        2: [HopHost(host='10.1.131.181', loss=0.0, avg_rtt=9.2, min_rtt=9.0, max_rtt=9.5)],
        3: [HopHost(host='10.250.139.186', loss=0.0, avg_rtt=9.2, min_rtt=9.0, max_rtt=9.4)],
        4: [HopHost(host='10.254.0.217', loss=0.0, avg_rtt=9.5, min_rtt=9.4, max_rtt=9.5)],
        5: [HopHost(host='89.97.200.190', loss=0.0, avg_rtt=10.0, min_rtt=9.6, max_rtt=10.3)],
        6: [HopHost(host='62-101-124-17.fastres.net', loss=0.0, avg_rtt=18.4, min_rtt=18.1, max_rtt=18.7)],
        7: [HopHost(host='209.85.168.64', loss=0.0, avg_rtt=17.3, min_rtt=17.0, max_rtt=17.6)],
        8: [HopHost(host='216.239.51.9', loss=0.0, avg_rtt=19.8, min_rtt=19.5, max_rtt=20.2)],
        9: [HopHost(host='216.239.50.241', loss=0.0, avg_rtt=16.8, min_rtt=16.8, max_rtt=16.8)],
        10: [HopHost(host='dns.google', loss=0.0, avg_rtt=20.5, min_rtt=20.4, max_rtt=20.6)],
    }
Esempio n. 6
0
def test_parser_bsd_4(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/bsd_4.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='128.3.112.1',
                    loss=None,
                    avg_rtt=0.0,
                    min_rtt=0.0,
                    max_rtt=0.0)
        ],
        2: [
            HopHost(host='128.32.216.1',
                    loss=None,
                    avg_rtt=32.333,
                    min_rtt=19.0,
                    max_rtt=39.0)
        ],
        3: [
            HopHost(host='128.32.216.1',
                    loss=None,
                    avg_rtt=25.667,
                    min_rtt=19.0,
                    max_rtt=39.0)
        ],
        4: [
            HopHost(host='128.32.136.23',
                    loss=None,
                    avg_rtt=32.667,
                    min_rtt=19.0,
                    max_rtt=40.0)
        ],
        5: [
            HopHost(host='128.32.168.35',
                    loss=None,
                    avg_rtt=39.0,
                    min_rtt=39.0,
                    max_rtt=39.0)
        ],
        6: [
            HopHost(host='128.32.133.254',
                    loss=None,
                    avg_rtt=45.667,
                    min_rtt=39.0,
                    max_rtt=59.0)
        ],
        7: [],
        8: [],
        9: [],
        10: [],
        11: [],
        12: [],
        13: [
            HopHost(host='128.32.131.22',
                    loss=None,
                    avg_rtt=45.667,
                    min_rtt=39.0,
                    max_rtt=59.0)
        ],
    }
Esempio n. 7
0
def test_parser_mtr_2(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/mtr_2.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='192.168.1.254', loss=0.0, avg_rtt=3.4, min_rtt=2.9, max_rtt=3.7)],
        2: [HopHost(host='10.1.131.181', loss=0.0, avg_rtt=12.9, min_rtt=8.9, max_rtt=27.7)],
        3: [HopHost(host='10.250.139.190', loss=0.0, avg_rtt=12.0, min_rtt=10.7, max_rtt=14.8)],
        4: [HopHost(host='10.254.0.217', loss=0.0, avg_rtt=12.5, min_rtt=10.7, max_rtt=15.9)],
        5: [HopHost(host='89.97.200.197', loss=0.0, avg_rtt=12.2, min_rtt=10.5, max_rtt=14.7)],
        6: [HopHost(host='93.57.68.145', loss=0.0, avg_rtt=13.1, min_rtt=11.6, max_rtt=14.6)],
        7: [HopHost(host='cloudflare-nap.namex.it', loss=0.0, avg_rtt=25.8, min_rtt=23.8, max_rtt=28.7)],
        8: [HopHost(host='172.68.197.126', loss=0.0, avg_rtt=30.5, min_rtt=24.8, max_rtt=33.8)],
        9: [HopHost(host='172.68.197.93', loss=0.0, avg_rtt=28.7, min_rtt=25.4, max_rtt=32.2)],
        10: [],
        11: [HopHost(host='text-lb.esams.wikimedia.org', loss=0.0, avg_rtt=49.6, min_rtt=48.3, max_rtt=50.8)],
    }
Esempio n. 8
0
def test_parser_win_tracert_2(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/win_tracert_2.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='172.16.0.5',
                    loss=None,
                    avg_rtt=0.0,
                    min_rtt=0,
                    max_rtt=0)
        ],
        2: [
            HopHost(host='192.168.0.50',
                    loss=None,
                    avg_rtt=0.0,
                    min_rtt=0,
                    max_rtt=0)
        ],
        3: [
            HopHost(host='122.56.168.186',
                    loss=None,
                    avg_rtt=3.667,
                    min_rtt=2.0,
                    max_rtt=6.0)
        ],
        4: [
            HopHost(host='122.56.99.240',
                    loss=None,
                    avg_rtt=2.667,
                    min_rtt=2.0,
                    max_rtt=3.0)
        ],
        5: [
            HopHost(host='122.56.99.243',
                    loss=None,
                    avg_rtt=3.0,
                    min_rtt=3.0,
                    max_rtt=3.0)
        ],
        6: [
            HopHost(host='122.56.116.6',
                    loss=None,
                    avg_rtt=3.0,
                    min_rtt=2.0,
                    max_rtt=4.0)
        ],
        7: [
            HopHost(host='122.56.116.5',
                    loss=None,
                    avg_rtt=7.333,
                    min_rtt=2.0,
                    max_rtt=16.0)
        ],
        8: [],
    }
Esempio n. 9
0
def test_parser_win_tracert_4(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/win_tracert_4.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.1.1',
                    loss=None,
                    avg_rtt=1.0,
                    min_rtt=1.0,
                    max_rtt=1.0)
        ],
        2: [
            HopHost(host='10.11.12.2',
                    loss=None,
                    avg_rtt=16.0,
                    min_rtt=16.0,
                    max_rtt=16.0)
        ],
        3: [
            HopHost(host='10.12.13.14',
                    loss=None,
                    avg_rtt=25.333,
                    min_rtt=17.0,
                    max_rtt=42.0)
        ],
        4: [
            HopHost(host='10.12.13.15',
                    loss=None,
                    avg_rtt=19.333,
                    min_rtt=16.0,
                    max_rtt=24.0)
        ],
        5: [
            HopHost(host='192.0.2.1',
                    loss=None,
                    avg_rtt=22.0,
                    min_rtt=17.0,
                    max_rtt=26.0)
        ],
        6: [
            HopHost(host='192.0.2.2',
                    loss=None,
                    avg_rtt=17.333,
                    min_rtt=17.0,
                    max_rtt=18.0)
        ],
        7: [
            HopHost(host='1.1.1.1',
                    loss=None,
                    avg_rtt=17.0,
                    min_rtt=17.0,
                    max_rtt=17.0)
        ],
    }
Esempio n. 10
0
def test_parser_linux_6(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/linux_6.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='192.168.0.1', loss=None, avg_rtt=9.87, min_rtt=9.87, max_rtt=9.87),
            HopHost(host='192.0.1.2', loss=None, avg_rtt=16.29, min_rtt=15.76, max_rtt=16.82)],
        2: [HopHost(host='10.11.12.161', loss=None, avg_rtt=15.973, min_rtt=14.67, max_rtt=18.14)],
        3: [HopHost(host='10.12.71.117', loss=None, avg_rtt=16.027, min_rtt=15.82, max_rtt=16.21)],
        4: [HopHost(host='10.12.72.70', loss=None, avg_rtt=30.497, min_rtt=27.84, max_rtt=33.26)],
        5: [HopHost(host='10.13.104.40', loss=None, avg_rtt=38.847, min_rtt=26.77, max_rtt=62.84)],
        6: [HopHost(host='10.10.10.10', loss=None, avg_rtt=25.67, min_rtt=25.15, max_rtt=26.1)],
    }
Esempio n. 11
0
def test_parser_linux_4(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/linux_4.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='2001:a61:2001:db8::', loss=None, avg_rtt=0.525, min_rtt=0.41, max_rtt=0.655)],
        2: [HopHost(host='2001:a60::89:705:1', loss=None, avg_rtt=34.189, min_rtt=26.428, max_rtt=41.777)],
        3: [HopHost(host='2001:a60::89:0:1:2', loss=None, avg_rtt=19.181, min_rtt=19.131, max_rtt=19.248)],
        4: [HopHost(host='2001:a60:0:106::2', loss=None, avg_rtt=20.463, min_rtt=20.457, max_rtt=20.467)],
        5: [HopHost(host='2001:4860::9:4000:cf86', loss=None, avg_rtt=21.844, min_rtt=21.836, max_rtt=21.852)],
        6: [HopHost(host='2001:4860:0:1::19', loss=None, avg_rtt=22.065, min_rtt=21.585, max_rtt=22.919)],
        7: [HopHost(host='2a00:1450:4016:804::200e', loss=None, avg_rtt=20.85, min_rtt=19.31, max_rtt=23.176)],
    }
Esempio n. 12
0
def test_parser_linux_1(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/linux_1.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='62.115.153.214', loss=None, avg_rtt=1.754, min_rtt=1.606, max_rtt=1.862)],
        2: [HopHost(host='62.115.116.17', loss=None, avg_rtt=1.736, min_rtt=1.701, max_rtt=1.767)],
        3: [HopHost(host='213.248.100.197', loss=None, avg_rtt=1.803, min_rtt=1.626, max_rtt=1.894)],
        4: [HopHost(host='185.235.236.46', loss=None, avg_rtt=1.339, min_rtt=1.314, max_rtt=1.36)],
        5: [HopHost(host='185.235.236.4', loss=None, avg_rtt=1.424, min_rtt=1.228, max_rtt=1.62),
            HopHost(host='185.235.236.8', loss=None, avg_rtt=1.606, min_rtt=1.606, max_rtt=1.606)],
        6: [HopHost(host='185.235.236.197', loss=None, avg_rtt=1.322, min_rtt=1.244, max_rtt=1.44)],
    }
Esempio n. 13
0
def test_parser_linux_3(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/linux_3.txt",
        tested_parser_class
    )
    assert p.hops == {
        1: [HopHost(host='2001:db8:0:f101::1', loss=None, avg_rtt=1.109, min_rtt=0.407, max_rtt=1.566)],
        2: [HopHost(host='3ffe:2000:0:400::1', loss=None, avg_rtt=91.588, min_rtt=90.431, max_rtt=92.377)],
        3: [HopHost(host='3ffe:2000:0:1::132', loss=None, avg_rtt=113.828, min_rtt=107.982, max_rtt=118.945)],
        4: [HopHost(host='3ffe:c00:8023:2b::2', loss=None, avg_rtt=978.434, min_rtt=968.468, max_rtt=993.392)],
        5: [HopHost(host='3ffe:2e00:e:c::3', loss=None, avg_rtt=507.42, min_rtt=505.549, max_rtt=508.928)],
        6: [HopHost(host='3ffe:b00:c18:1::10', loss=None, avg_rtt=1285.295, min_rtt=1265.85, max_rtt=1304.74)],
    }
Esempio n. 14
0
def test_parser_iosxr_1(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/iosxr_1.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='1.2.3.4',
                    loss=None,
                    avg_rtt=0.333,
                    min_rtt=0.0,
                    max_rtt=1.0)
        ],
        2: [
            HopHost(host='1.2.5.6',
                    loss=None,
                    avg_rtt=89.667,
                    min_rtt=88.0,
                    max_rtt=91.0)
        ],
        3: [
            HopHost(host='1.2.7.8',
                    loss=None,
                    avg_rtt=89.5,
                    min_rtt=89.0,
                    max_rtt=90.0)
        ],
        4: [
            HopHost(host='3.4.5.6',
                    loss=None,
                    avg_rtt=117.0,
                    min_rtt=117.0,
                    max_rtt=117.0)
        ],
        5: [
            HopHost(host='1.2.1.2',
                    loss=None,
                    avg_rtt=125.0,
                    min_rtt=125.0,
                    max_rtt=125.0),
            HopHost(host='1.2.2.1',
                    loss=None,
                    avg_rtt=120.0,
                    min_rtt=120.0,
                    max_rtt=120.0)
        ],
        6: [],
        7: [],
    }
Esempio n. 15
0
def test_parser_win_tracert_1(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/win_tracert_1.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='10.1.0.1',
                    loss=None,
                    avg_rtt=0.0,
                    min_rtt=0,
                    max_rtt=0)
        ],
        2: [
            HopHost(host='98.245.140.1',
                    loss=None,
                    avg_rtt=27.667,
                    min_rtt=19.0,
                    max_rtt=35.0)
        ],
        3: [
            HopHost(host='68.85.105.201',
                    loss=None,
                    avg_rtt=15.667,
                    min_rtt=9.0,
                    max_rtt=27.0)
        ],
        4: [
            HopHost(host='209.85.241.37',
                    loss=None,
                    avg_rtt=77.333,
                    min_rtt=75.0,
                    max_rtt=81.0)
        ],
        5: [
            HopHost(host='209.85.248.102',
                    loss=None,
                    avg_rtt=87.333,
                    min_rtt=84.0,
                    max_rtt=91.0)
        ],
        6: [
            HopHost(host='209.85.225.104',
                    loss=None,
                    avg_rtt=88.0,
                    min_rtt=76.0,
                    max_rtt=112.0)
        ],
    }
def test_parser_mtr_interactive_1(parser_ctx):
    p = parser_ctx.parse_test_file(
        "tests/data/traceroute/mtr_interactive_1.txt", tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.1.254',
                    loss=0.0,
                    avg_rtt=11.6,
                    min_rtt=2.0,
                    max_rtt=50.7)
        ],
        2: [
            HopHost(host='10.1.131.181',
                    loss=0.0,
                    avg_rtt=38.3,
                    min_rtt=8.8,
                    max_rtt=112.8)
        ],
        3: [
            HopHost(host='10.250.139.186',
                    loss=0.0,
                    avg_rtt=41.6,
                    min_rtt=9.9,
                    max_rtt=142.4)
        ],
        4: [
            HopHost(host='10.254.0.217',
                    loss=0.0,
                    avg_rtt=22.1,
                    min_rtt=10.0,
                    max_rtt=57.9)
        ],
        5: [
            HopHost(host='89.97.200.190',
                    loss=0.0,
                    avg_rtt=29.0,
                    min_rtt=9.4,
                    max_rtt=123.4)
        ],
        6: [
            HopHost(host='62-101-124-17.fastres.net',
                    loss=0.0,
                    avg_rtt=27.4,
                    min_rtt=18.5,
                    max_rtt=93.6)
        ],
        7: [
            HopHost(host='209.85.168.64',
                    loss=0.0,
                    avg_rtt=41.0,
                    min_rtt=21.6,
                    max_rtt=108.8)
        ],
        8: [
            HopHost(host='216.239.51.9',
                    loss=0.0,
                    avg_rtt=32.1,
                    min_rtt=19.9,
                    max_rtt=147.4)
        ],
        9: [
            HopHost(host='216.239.50.241',
                    loss=0.0,
                    avg_rtt=34.0,
                    min_rtt=21.4,
                    max_rtt=76.2)
        ],
        10: [
            HopHost(host='dns.google',
                    loss=0.0,
                    avg_rtt=66.5,
                    min_rtt=21.3,
                    max_rtt=172.5)
        ],
    }
Esempio n. 17
0
def test_parser_win_tracert_3(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/win_tracert_3.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='172.16.0.5',
                    loss=None,
                    avg_rtt=0.0,
                    min_rtt=0,
                    max_rtt=0)
        ],
        2: [
            HopHost(host='192.168.0.50',
                    loss=None,
                    avg_rtt=0.667,
                    min_rtt=0,
                    max_rtt=1.0)
        ],
        3: [
            HopHost(host='122.56.168.186',
                    loss=None,
                    avg_rtt=3.333,
                    min_rtt=2.0,
                    max_rtt=5.0)
        ],
        4: [
            HopHost(host='122.56.99.240',
                    loss=None,
                    avg_rtt=2.333,
                    min_rtt=2.0,
                    max_rtt=3.0)
        ],
        5: [
            HopHost(host='122.56.99.243',
                    loss=None,
                    avg_rtt=3.667,
                    min_rtt=3.0,
                    max_rtt=5.0)
        ],
        6: [],
        7: [
            HopHost(host='122.56.116.5',
                    loss=None,
                    avg_rtt=2.667,
                    min_rtt=2.0,
                    max_rtt=3.0)
        ],
        8: [
            HopHost(host='122.56.119.53',
                    loss=None,
                    avg_rtt=3.0,
                    min_rtt=2.0,
                    max_rtt=4.0)
        ],
        9: [
            HopHost(host='202.50.232.242',
                    loss=None,
                    avg_rtt=27.0,
                    min_rtt=27.0,
                    max_rtt=27.0)
        ],
        10: [
            HopHost(host='202.50.232.246',
                    loss=None,
                    avg_rtt=26.333,
                    min_rtt=25.0,
                    max_rtt=27.0)
        ],
        11: [
            HopHost(host='72.14.217.100',
                    loss=None,
                    avg_rtt=27.0,
                    min_rtt=26.0,
                    max_rtt=28.0)
        ],
        12: [
            HopHost(host='108.170.247.33',
                    loss=None,
                    avg_rtt=27.0,
                    min_rtt=27.0,
                    max_rtt=27.0)
        ],
        13: [
            HopHost(host='209.85.250.139',
                    loss=None,
                    avg_rtt=27.0,
                    min_rtt=27.0,
                    max_rtt=27.0)
        ],
        14: [
            HopHost(host='216.58.200.99',
                    loss=None,
                    avg_rtt=27.0,
                    min_rtt=27.0,
                    max_rtt=27.0)
        ],
    }
Esempio n. 18
0
def test_parser_bsd_3(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/bsd_3.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='128.3.112.1',
                    loss=None,
                    avg_rtt=0.0,
                    min_rtt=0.0,
                    max_rtt=0.0)
        ],
        2: [
            HopHost(host='128.32.216.1',
                    loss=None,
                    avg_rtt=19.0,
                    min_rtt=19.0,
                    max_rtt=19.0)
        ],
        3: [
            HopHost(host='128.32.216.1',
                    loss=None,
                    avg_rtt=25.667,
                    min_rtt=19.0,
                    max_rtt=39.0)
        ],
        4: [
            HopHost(host='128.32.136.23',
                    loss=None,
                    avg_rtt=32.333,
                    min_rtt=19.0,
                    max_rtt=39.0)
        ],
        5: [
            HopHost(host='128.32.168.22',
                    loss=None,
                    avg_rtt=32.667,
                    min_rtt=20.0,
                    max_rtt=39.0)
        ],
        6: [
            HopHost(host='128.32.197.4',
                    loss=None,
                    avg_rtt=72.333,
                    min_rtt=39.0,
                    max_rtt=119.0)
        ],
        7: [
            HopHost(host='131.119.2.5',
                    loss=None,
                    avg_rtt=52.333,
                    min_rtt=39.0,
                    max_rtt=59.0)
        ],
        8: [
            HopHost(host='129.140.70.13',
                    loss=None,
                    avg_rtt=86.0,
                    min_rtt=79.0,
                    max_rtt=99.0)
        ],
        9: [
            HopHost(host='129.140.71.6',
                    loss=None,
                    avg_rtt=145.667,
                    min_rtt=139.0,
                    max_rtt=159.0)
        ],
        10: [
            HopHost(host='129.140.81.7',
                    loss=None,
                    avg_rtt=226.333,
                    min_rtt=180.0,
                    max_rtt=300.0)
        ],
        11: [
            HopHost(host='129.140.72.17',
                    loss=None,
                    avg_rtt=259.333,
                    min_rtt=239.0,
                    max_rtt=300.0)
        ],
        12: [],
        13: [
            HopHost(host='128.121.54.72',
                    loss=None,
                    avg_rtt=345.667,
                    min_rtt=259.0,
                    max_rtt=499.0)
        ],
        14: [],
        15: [],
        16: [],
        17: [],
        18: [
            HopHost(host='18.26.0.115',
                    loss=None,
                    avg_rtt=299.0,
                    min_rtt=279.0,
                    max_rtt=339.0)
        ],
    }
Esempio n. 19
0
def test_parser_mtr_json_1(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/mtr_json_1.json",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.1.254',
                    loss=0.0,
                    avg_rtt=5.48,
                    min_rtt=3.65,
                    max_rtt=10.55)
        ],
        2: [
            HopHost(host='10.1.131.181',
                    loss=0.0,
                    avg_rtt=16.35,
                    min_rtt=10.26,
                    max_rtt=37.55)
        ],
        3: [
            HopHost(host='10.250.139.186',
                    loss=0.0,
                    avg_rtt=11.6,
                    min_rtt=11.2,
                    max_rtt=11.98)
        ],
        4: [
            HopHost(host='10.254.0.217',
                    loss=0.0,
                    avg_rtt=12.56,
                    min_rtt=11.03,
                    max_rtt=17.78)
        ],
        5: [
            HopHost(host='89.97.200.190',
                    loss=0.0,
                    avg_rtt=11.43,
                    min_rtt=10.98,
                    max_rtt=12.35)
        ],
        6: [
            HopHost(host='62-101-124-17.fastres.net',
                    loss=0.0,
                    avg_rtt=59.78,
                    min_rtt=20.25,
                    max_rtt=101.01)
        ],
        7: [
            HopHost(host='209.85.168.64',
                    loss=0.0,
                    avg_rtt=19.72,
                    min_rtt=19.52,
                    max_rtt=19.92)
        ],
        8: [
            HopHost(host='216.239.51.9',
                    loss=0.0,
                    avg_rtt=21.97,
                    min_rtt=21.43,
                    max_rtt=22.67)
        ],
        9: [
            HopHost(host='216.239.50.241',
                    loss=0.0,
                    avg_rtt=19.91,
                    min_rtt=19.45,
                    max_rtt=20.51)
        ],
        10: [
            HopHost(host='dns.google',
                    loss=0.0,
                    avg_rtt=22.86,
                    min_rtt=22.01,
                    max_rtt=23.3)
        ],
    }
Esempio n. 20
0
def test_parser_mtr_json_2(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/mtr_json_2.json",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.1.254',
                    loss=0.0,
                    avg_rtt=3.79,
                    min_rtt=3.33,
                    max_rtt=4.06)
        ],
        2: [
            HopHost(host='10.1.131.181',
                    loss=0.0,
                    avg_rtt=14.78,
                    min_rtt=9.21,
                    max_rtt=34.42)
        ],
        3: [
            HopHost(host='10.250.139.190',
                    loss=0.0,
                    avg_rtt=10.71,
                    min_rtt=10.08,
                    max_rtt=11.5)
        ],
        4: [
            HopHost(host='10.254.0.221',
                    loss=0.0,
                    avg_rtt=10.69,
                    min_rtt=9.12,
                    max_rtt=11.7)
        ],
        5: [
            HopHost(host='89.97.200.201',
                    loss=0.0,
                    avg_rtt=10.68,
                    min_rtt=10.03,
                    max_rtt=11.07)
        ],
        6: [
            HopHost(host='93.63.100.141',
                    loss=0.0,
                    avg_rtt=19.02,
                    min_rtt=18.47,
                    max_rtt=20.02)
        ],
        7: [
            HopHost(host='217.29.66.1',
                    loss=0.0,
                    avg_rtt=22.22,
                    min_rtt=21.72,
                    max_rtt=22.51)
        ],
        8: [
            HopHost(host='217.29.76.16',
                    loss=0.0,
                    avg_rtt=18.74,
                    min_rtt=18.38,
                    max_rtt=19.07)
        ],
    }
Esempio n. 21
0
def test_parser_unknown1_1(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/unknown1_1.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='_gateway',
                    loss=None,
                    avg_rtt=0.889,
                    min_rtt=0.874,
                    max_rtt=0.905)
        ],
        2: [
            HopHost(host='hostname1',
                    loss=None,
                    avg_rtt=10.599,
                    min_rtt=10.599,
                    max_rtt=10.599)
        ],
        3: [
            HopHost(host='192.0.2.1',
                    loss=None,
                    avg_rtt=11.419,
                    min_rtt=11.419,
                    max_rtt=11.419)
        ],
        4: [
            HopHost(host='192.0.2.2',
                    loss=None,
                    avg_rtt=10.929,
                    min_rtt=10.929,
                    max_rtt=10.929)
        ],
        5: [
            HopHost(host='peer8-et-3-0-2.example.com',
                    loss=None,
                    avg_rtt=11.096,
                    min_rtt=11.096,
                    max_rtt=11.096)
        ],
        6: [
            HopHost(host='10.0.0.1',
                    loss=None,
                    avg_rtt=10.909,
                    min_rtt=10.909,
                    max_rtt=10.909)
        ],
        7: [
            HopHost(host='ae24.net.example.com',
                    loss=None,
                    avg_rtt=11.195,
                    min_rtt=11.195,
                    max_rtt=11.195)
        ],
        8: [
            HopHost(host='ae28.net.example.com',
                    loss=None,
                    avg_rtt=11.332,
                    min_rtt=11.332,
                    max_rtt=11.332)
        ],
        9: [
            HopHost(host='ae31.net.example.com',
                    loss=None,
                    avg_rtt=15.583,
                    min_rtt=15.583,
                    max_rtt=15.583)
        ],
        10: [
            HopHost(host='ae29.net.example.com',
                    loss=None,
                    avg_rtt=20.834,
                    min_rtt=20.834,
                    max_rtt=20.834)
        ],
    }
Esempio n. 22
0
def test_parser_mtr_json_3(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/mtr_json_3.json",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.2.254',
                    loss=0.0,
                    avg_rtt=0.5,
                    min_rtt=0.5,
                    max_rtt=0.5)
        ],
        2: [
            HopHost(host='10.0.0.1',
                    loss=0.0,
                    avg_rtt=2.7,
                    min_rtt=1.9,
                    max_rtt=3.7)
        ],
        3: [
            HopHost(host='10.1.0.1',
                    loss=0.0,
                    avg_rtt=3.6,
                    min_rtt=1.3,
                    max_rtt=6.3)
        ],
        4: [
            HopHost(host='10.2.0.1',
                    loss=0.0,
                    avg_rtt=3.0,
                    min_rtt=2.2,
                    max_rtt=3.9)
        ],
        5: [
            HopHost(host='10.3.0.1',
                    loss=0.0,
                    avg_rtt=1.9,
                    min_rtt=1.2,
                    max_rtt=3.0)
        ],
        6: [
            HopHost(host='10.4.0.1',
                    loss=0.0,
                    avg_rtt=3.3,
                    min_rtt=2.0,
                    max_rtt=4.0)
        ],
        7: [
            HopHost(host='10.5.0.1',
                    loss=0.0,
                    avg_rtt=3.1,
                    min_rtt=2.4,
                    max_rtt=4.1)
        ],
        8: [
            HopHost(host='10.6.0.1',
                    loss=0.0,
                    avg_rtt=5.9,
                    min_rtt=5.0,
                    max_rtt=6.8)
        ],
        9: [
            HopHost(host='10.7.0.1',
                    loss=0.0,
                    avg_rtt=12.9,
                    min_rtt=6.7,
                    max_rtt=32.8)
        ],
        10: [
            HopHost(host='10.8.0.1',
                    loss=0.0,
                    avg_rtt=7.5,
                    min_rtt=6.4,
                    max_rtt=8.2)
        ],
        11: [
            HopHost(host='10.9.0.1',
                    loss=0.0,
                    avg_rtt=5.4,
                    min_rtt=4.5,
                    max_rtt=6.4)
        ],
        12: [
            HopHost(host='8.8.8.8',
                    loss=0.0,
                    avg_rtt=5.6,
                    min_rtt=4.4,
                    max_rtt=6.5)
        ],
    }
Esempio n. 23
0
def test_parser_junos_1(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/junos_1.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='10.1.2.185',
                    loss=0.0,
                    avg_rtt=1.7,
                    min_rtt=0.6,
                    max_rtt=8.3)
        ],
        2: [
            HopHost(host='10.2.2.234',
                    loss=0.0,
                    avg_rtt=239.2,
                    min_rtt=239.1,
                    max_rtt=239.3)
        ],
        3: [
            HopHost(host='10.2.3.190',
                    loss=10.0,
                    avg_rtt=2.4,
                    min_rtt=1.7,
                    max_rtt=2.9)
        ],
        4: [
            HopHost(host='10.2.2.111',
                    loss=20.0,
                    avg_rtt=76.4,
                    min_rtt=75.1,
                    max_rtt=82.1)
        ],
        5: [
            HopHost(host='10.2.3.189',
                    loss=50.0,
                    avg_rtt=132.7,
                    min_rtt=131.4,
                    max_rtt=134.2)
        ],
        6: [
            HopHost(host='10.2.3.192',
                    loss=80.0,
                    avg_rtt=243.5,
                    min_rtt=242.0,
                    max_rtt=245.1)
        ],
        7: [
            HopHost(host='10.2.6.133',
                    loss=0.0,
                    avg_rtt=246.3,
                    min_rtt=246.0,
                    max_rtt=246.9)
        ],
        8: [
            HopHost(host='10.2.2.246',
                    loss=0.0,
                    avg_rtt=240.5,
                    min_rtt=240.0,
                    max_rtt=241.4)
        ],
        9: [
            HopHost(host='10.3.177.106',
                    loss=0.0,
                    avg_rtt=236.9,
                    min_rtt=236.6,
                    max_rtt=238.4)
        ],
        10: [],
        11: [],
        12: [
            HopHost(host='10.4.81.34',
                    loss=0.0,
                    avg_rtt=245.6,
                    min_rtt=244.7,
                    max_rtt=249.8)
        ],
        13: [],
        14: [],
        15: [
            HopHost(host='10.5.5.143',
                    loss=11.1,
                    avg_rtt=243.3,
                    min_rtt=243.1,
                    max_rtt=243.8)
        ],
    }
Esempio n. 24
0
def test_parser_iosxr_2(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/iosxr_2.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.0.1',
                    loss=None,
                    avg_rtt=0.667,
                    min_rtt=0.0,
                    max_rtt=1.0)
        ],
        2: [
            HopHost(host='10.5.226.206',
                    loss=None,
                    avg_rtt=98.5,
                    min_rtt=98.0,
                    max_rtt=99.0),
            HopHost(host='10.7.110.97',
                    loss=None,
                    avg_rtt=98.0,
                    min_rtt=98.0,
                    max_rtt=98.0)
        ],
        3: [
            HopHost(host='10.11.128.50',
                    loss=None,
                    avg_rtt=97.333,
                    min_rtt=97.0,
                    max_rtt=98.0)
        ],
        4: [
            HopHost(host='10.12.66.97',
                    loss=None,
                    avg_rtt=241.0,
                    min_rtt=241.0,
                    max_rtt=241.0),
            HopHost(host='10.11.128.50',
                    loss=None,
                    avg_rtt=97.0,
                    min_rtt=97.0,
                    max_rtt=97.0)
        ],
        5: [
            HopHost(host='10.12.3.38',
                    loss=None,
                    avg_rtt=237.0,
                    min_rtt=236.0,
                    max_rtt=239.0)
        ],
        6: [
            HopHost(host='10.12.3.38',
                    loss=None,
                    avg_rtt=236.5,
                    min_rtt=236.0,
                    max_rtt=237.0),
            HopHost(host='10.12.4.194',
                    loss=None,
                    avg_rtt=240.0,
                    min_rtt=240.0,
                    max_rtt=240.0)
        ],
        7: [
            HopHost(host='10.12.2.166',
                    loss=None,
                    avg_rtt=241.333,
                    min_rtt=240.0,
                    max_rtt=242.0)
        ],
        8: [
            HopHost(host='10.12.3.145',
                    loss=None,
                    avg_rtt=240.0,
                    min_rtt=240.0,
                    max_rtt=240.0),
            HopHost(host='10.12.2.166',
                    loss=None,
                    avg_rtt=241.0,
                    min_rtt=241.0,
                    max_rtt=241.0)
        ],
        9: [
            HopHost(host='10.13.36.121',
                    loss=None,
                    avg_rtt=262.333,
                    min_rtt=262.0,
                    max_rtt=263.0)
        ],
    }
Esempio n. 25
0
def test_parser_winmtr_1(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/winmtr_1.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='192.168.1.1',
                    loss=0.0,
                    avg_rtt=0.0,
                    min_rtt=0.0,
                    max_rtt=3.0)
        ],
        2: [],
        3: [
            HopHost(host='172.17.217.48',
                    loss=0.0,
                    avg_rtt=9.0,
                    min_rtt=7.0,
                    max_rtt=20.0)
        ],
        4: [
            HopHost(host='172.17.218.156',
                    loss=0.0,
                    avg_rtt=11.0,
                    min_rtt=8.0,
                    max_rtt=26.0)
        ],
        5: [
            HopHost(host='172.19.184.14',
                    loss=0.0,
                    avg_rtt=10.0,
                    min_rtt=9.0,
                    max_rtt=21.0)
        ],
        6: [
            HopHost(host='172.19.177.26',
                    loss=0.0,
                    avg_rtt=13.0,
                    min_rtt=10.0,
                    max_rtt=27.0)
        ],
        7: [
            HopHost(host='192.168.205.98',
                    loss=0.0,
                    avg_rtt=14.0,
                    min_rtt=10.0,
                    max_rtt=29.0)
        ],
        8: [
            HopHost(host='10.1.109.236',
                    loss=0.0,
                    avg_rtt=13.0,
                    min_rtt=11.0,
                    max_rtt=29.0)
        ],
        9: [
            HopHost(host='10.1.138.234',
                    loss=0.0,
                    avg_rtt=14.0,
                    min_rtt=12.0,
                    max_rtt=29.0)
        ],
        10: [
            HopHost(host='10.2.69.253',
                    loss=0.0,
                    avg_rtt=15.0,
                    min_rtt=13.0,
                    max_rtt=29.0)
        ],
        11: [
            HopHost(host='8.8.8.8',
                    loss=0.0,
                    avg_rtt=13.0,
                    min_rtt=10.0,
                    max_rtt=29.0)
        ],
    }
Esempio n. 26
0
def test_parser_bsd_2(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/bsd_2.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [
            HopHost(host='128.3.112.1',
                    loss=None,
                    avg_rtt=12.667,
                    min_rtt=0.0,
                    max_rtt=19.0)
        ],
        2: [
            HopHost(host='128.32.216.1',
                    loss=None,
                    avg_rtt=32.333,
                    min_rtt=19.0,
                    max_rtt=39.0)
        ],
        3: [
            HopHost(host='128.32.216.1',
                    loss=None,
                    avg_rtt=32.333,
                    min_rtt=19.0,
                    max_rtt=39.0)
        ],
        4: [
            HopHost(host='128.32.136.23',
                    loss=None,
                    avg_rtt=39.333,
                    min_rtt=39.0,
                    max_rtt=40.0)
        ],
        5: [
            HopHost(host='128.32.168.22',
                    loss=None,
                    avg_rtt=39.0,
                    min_rtt=39.0,
                    max_rtt=39.0)
        ],
        6: [
            HopHost(host='128.32.197.4',
                    loss=None,
                    avg_rtt=52.667,
                    min_rtt=40.0,
                    max_rtt=59.0)
        ],
        7: [
            HopHost(host='131.119.2.5',
                    loss=None,
                    avg_rtt=59.0,
                    min_rtt=59.0,
                    max_rtt=59.0)
        ],
        8: [
            HopHost(host='129.140.70.13',
                    loss=None,
                    avg_rtt=92.667,
                    min_rtt=80.0,
                    max_rtt=99.0)
        ],
        9: [
            HopHost(host='129.140.71.6',
                    loss=None,
                    avg_rtt=232.333,
                    min_rtt=139.0,
                    max_rtt=319.0)
        ],
        10: [
            HopHost(host='129.140.81.7',
                    loss=None,
                    avg_rtt=206.0,
                    min_rtt=199.0,
                    max_rtt=220.0)
        ],
        11: [
            HopHost(host='35.1.1.48',
                    loss=None,
                    avg_rtt=239.0,
                    min_rtt=239.0,
                    max_rtt=239.0)
        ],
    }
Esempio n. 27
0
def test_parser_bsd_1(parser_ctx):
    p = parser_ctx.parse_test_file("tests/data/traceroute/bsd_1.txt",
                                   tested_parser_class)
    assert p.hops == {
        1: [HopHost('192.168.1.254', None, 3.444, 3.118, 3.641)],
        2: [HopHost('10.1.131.181', None, 9.759, 9.465, 10.311)],
        3: [HopHost('10.250.139.186', None, 14.33, 14.007, 14.967)],
        4: [
            HopHost('10.254.0.217', None, 12.849, 12.522, 13.175),
            HopHost('10.254.0.221', None, 13.178, 13.178, 13.178)
        ],
        5: [
            HopHost('89.97.200.190', None, 13.019, 13.019, 13.019),
            HopHost('89.97.200.201', None, 12.929, 12.929, 12.929),
            HopHost('89.97.200.186', None, 11.096, 11.096, 11.096)
        ],
        6: [
            HopHost('93.57.68.145', None, 12.909, 11.639, 14.18),
            HopHost('93.57.68.149', None, 15.658, 15.658, 15.658)
        ],
        7: [HopHost('193.201.28.33', None, 27.094, 26.245, 28.388)],
        8: [
            HopHost('172.68.197.130', None, 32.96, 32.96, 32.96),
            HopHost('172.68.197.8', None, 33.978, 33.756, 34.2)
        ],
        9: [],
        10: [],
    }