01-23-2023 09:47 AM
Hi,
Does anyone know if Cisco plan to provide with the python "requests" librairy in the incoming release of the Guestshell ?
Thanks in advance,
Jerems
Solved! Go to Solution.
01-23-2023 10:27 PM - edited 01-23-2023 10:45 PM
Hi Jerems
You can install packages via pip in guestshell:
[guestshell@guestshell ~]$ sudo pip3 install requests
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e
100% |################################| 71kB 1.8MB/s
<SNIP>
[guestshell@guestshell ~]$ python3
Python 3.6.8 (default, Dec 22 2020, 19:04:08)
[GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>
01-24-2023 02:20 AM
Hello dear community,
If you plan to provide with Internet access to your Guestshell container please follow this procedure :
Configure interface VirtualPortGroup0 (GW for the container):
interface VirtualPortGroup0
ip address 192.168.1.1 255.255.255.0
ip nat inside
no mop enabled
no mop sysid
Configure interface GigabitEthernet0/0/0.13 (My "WAN" interface"):
interface GigabitEthernet0/0/0.13
encapsulation dot1Q 13
ip address 192.168.13.2 255.255.255.252
ip nat outside
Configure NAT :
ip nat inside source list GUESTSHELL-NAT-ACL interface GigabitEthernet0/0/0.13 overload
ip access-list extended GUESTSHELL-NAT-ACL
10 permit ip 192.168.1.0 0.0.0.255 any
And the app-hosting part:
app-hosting appid guestshell
app-vnic gateway0 virtualportgroup 0 guest-interface 0
guest-ipaddress 192.168.1.2 netmask 255.255.255.0
app-default-gateway 192.168.1.1 guest-interface 0
name-server0 192.168.0.252
name-server1 192.168.0.250
Regards,
01-23-2023 10:27 PM - edited 01-23-2023 10:45 PM
Hi Jerems
You can install packages via pip in guestshell:
[guestshell@guestshell ~]$ sudo pip3 install requests
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
https://files.pythonhosted.org/packages/2d/61/08076519c80041bc0ffa1a8af0cbd3bf3e
100% |################################| 71kB 1.8MB/s
<SNIP>
[guestshell@guestshell ~]$ python3
Python 3.6.8 (default, Dec 22 2020, 19:04:08)
[GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>>
01-24-2023 01:26 AM
To do so i need to provide with internet access to guestshell which seems impossible at the moment.
My guestshell runs on top of a Cisco ISR1111 version 16.12.04.
By the way, let me double check with google if i can find out a way to fix this.
01-24-2023 01:40 AM
Yes, either internet access or you host your own repo somewhere accessible by the router (https://packaging.python.org/en/latest/guides/hosting-your-own-index/)
01-24-2023 02:06 AM
Hi,
I found a fix to allow the guestshell to access Internet :
Thanks to this article :
https://blog.wimwauters.com/networkprogrammability/2020-06-08_guestshell_onbox/
Thank you again
01-24-2023 02:19 AM
Hello dear community,
If you plan to provide with Internet access to your Guestshell container please follow this procedure :
Configure interface VirtualPortGroup0 (GW for the container):
interface VirtualPortGroup0
ip address 192.168.1.1 255.255.255.0
ip nat inside
no mop enabled
no mop sysid
Configure interface GigabitEthernet0/0/0.13 (My "WAN" interface"):
interface GigabitEthernet0/0/0.13
description Lien vers Jeyniper01 - vlan Internet
encapsulation dot1Q 13
ip address 192.168.13.2 255.255.255.252
ip nat outside
Configure NAT :
ip nat inside source list GUESTSHELL-NAT-ACL interface GigabitEthernet0/0/0.13 overload
ip access-list extended GUESTSHELL-NAT-ACL
10 permit ip 192.168.1.0 0.0.0.255 any
And the app-hosting part:
app-hosting appid guestshell
app-vnic gateway0 virtualportgroup 0 guest-interface 0
guest-ipaddress 192.168.1.2 netmask 255.255.255.0
app-default-gateway 192.168.1.1 guest-interface 0
name-server0 192.168.0.252
name-server1 192.168.0.250
Regards,
01-24-2023 02:20 AM
Hello dear community,
If you plan to provide with Internet access to your Guestshell container please follow this procedure :
Configure interface VirtualPortGroup0 (GW for the container):
interface VirtualPortGroup0
ip address 192.168.1.1 255.255.255.0
ip nat inside
no mop enabled
no mop sysid
Configure interface GigabitEthernet0/0/0.13 (My "WAN" interface"):
interface GigabitEthernet0/0/0.13
encapsulation dot1Q 13
ip address 192.168.13.2 255.255.255.252
ip nat outside
Configure NAT :
ip nat inside source list GUESTSHELL-NAT-ACL interface GigabitEthernet0/0/0.13 overload
ip access-list extended GUESTSHELL-NAT-ACL
10 permit ip 192.168.1.0 0.0.0.255 any
And the app-hosting part:
app-hosting appid guestshell
app-vnic gateway0 virtualportgroup 0 guest-interface 0
guest-ipaddress 192.168.1.2 netmask 255.255.255.0
app-default-gateway 192.168.1.1 guest-interface 0
name-server0 192.168.0.252
name-server1 192.168.0.250
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide