forked from adosztal/gns3-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday0-csr1kv.exp
More file actions
64 lines (44 loc) · 1.07 KB
/
day0-csr1kv.exp
File metadata and controls
64 lines (44 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
set gns3_host [lindex $argv 0];
set port [lindex $argv 1];
set hostname [lindex $argv 2];
set mgmt_ip [lindex $argv 3];
set mgmt_gw [lindex $argv 4];
set timeout 600
log_user 0
spawn telnet $gns3_host $port
expect "Would you like to enter the initial configuration dialog"
send "n\n"
expect "Would you like to terminate autoinstall"
send "y\n"
expect "server has been generated or imported"
send "\r\n"
expect "Router>"
send "en\n"
expect "Router#"
send "conf t\n"
expect "Router(config)#"
send "hostname $hostname\n"
expect "$hostname"
send "vrf definition management\n"
expect "$hostname"
send "description Management VRF\n"
expect "$hostname"
send "address-family ipv4 unicast\n"
expect "$hostname"
send "exit\n"
expect "$hostname"
send "exit\n"
expect "$hostname"
send "interface gi1\n"
expect "$hostname"
send "vrf forwarding management\n"
expect "$hostname"
send "ip address $mgmt_ip\n"
expect "$hostname"
send "no shut\n"
expect "$hostname"
send "ip route vrf management 0.0.0.0 0.0.0.0 $mgmt_gw\n"
expect "$hostname"
send "end\n"
expect "$hostname"
send "exit\n"